PCCar.ru - Ваш автомобильный компьютер

Вернуться   PCCar.ru - Ваш автомобильный компьютер > MP3Car ТехИнфа > АвтоЗвук

Ответ
 
Опции темы Поиск в этой теме
Старый 23.06.2016, 18:52   #1891
kaamoss
Старший Пользователь
 
Регистрация: 17.10.2015
Возраст: 42
Регион: 54
Сообщений: 171
kaamoss is on a distinguished road
По умолчанию

У меня есть сборка фубара она всегда всё правильно отображает, но я не понима. где посмотреть прописанные скрипты.
kaamoss вне форума   Ответить с цитированием
Старый 23.06.2016, 18:54   #1892
kaamoss
Старший Пользователь
 
Регистрация: 17.10.2015
Возраст: 42
Регион: 54
Сообщений: 171
kaamoss is on a distinguished road
По умолчанию

Цитата:
Сообщение от seriousstas Посмотреть сообщение
kaamoss
Почитай выше и я о том ..
Я просто не успел, ты на пару секунд раньше успел отписать))))
kaamoss вне форума   Ответить с цитированием
Старый 23.06.2016, 18:55   #1893
seriousstas
Бывалый писикарщик
 
Регистрация: 14.06.2013
Регион: Украина
Машина: Nissan Qashqai+2
Сообщений: 3,424
seriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant future
По умолчанию

Цитата:
Сообщение от kaamoss Посмотреть сообщение
У меня есть сборка фубара она всегда всё правильно отображает, но я не понима. где посмотреть прописанные скрипты.
Там совсем другие компоненты ..
С этим - тоже всё нормально :
Код:
// ==PREPROCESSOR==
// @name "TOUCH LIBRARY PANEL TREE mod_5"
// @version "1.0"
// @author "Vo Thanh Dat moded by Terro"
// @feature "watch-metadb"
// @tooltip "custom-paint"
// ==/PREPROCESSOR==
//
//=========================for full functionality use WSH Panel MOD 1.5.10
//======================================================================= Color change from line 104 - 107
function RGB(r,g,b) { return (0xff000000|(r<<16)|(g<<8)|(b)); }
function RGBA(r, g, b, a) { return ((a << 24) | (r << 16) | (g << 8) | (b)); } 

function test_perfomance(){
}
var slide_r = window.GetProperty("Slide_right",50)
var lbdn = 0;
var y_start = 0;
var y_end = 0;
var y_delta = 0;

var form_text = "",
    form_text_b = "",
    form_text_b_ = "",
    form_his = [],
    form_his_ = [];

var char_index = [],
    playlist = [],
    playlist_dr = [],
    index_search = [],
    index_search_ = [],
    index_path = [],
    list = plman.GetPlaylistItems(-1),
    list_;
    
var m_x = 0,m_y = 0,
    ww = 0,wh = 0,
    bold_start = 0,bold_end = 0,
    mm_x = 0,mm_y =0,m_tam = -1,
    idx_idx = 0, scroll = 0,scroll_ = 0,scroll__ = 0,scroll___ = 0,
    mouse_index  = -1,
    form_text_cusor = 0,
    form_text_cusor_x = 0,
    repaint_visible = 0,
    time_dl = 0;
//=====================added
var g_time000 = window.SetInterval(on_timer, 16);
//=====================
var time111 = (new Date().getTime()),
    time222 = time111,
    time333 = time111;
    
var fso = new ActiveXObject("Scripting.FileSystemObject"),
    WshShell = new ActiveXObject("WScript.Shell"),
    htmlfile = new ActiveXObject('htmlfile'),
    vbe = new ActiveXObject('ScriptControl');
    
var time_h = fb.CreateProfiler(),
    time_repaint = fb.CreateProfiler(),
    time200 = fb.CreateProfiler("aaaa"),
    time_s = fb.CreateProfiler();
var mouse_l_hold = false,mouse_l_hold_f = false,
    window_visible = false,on_form = false,
    mouse_hold = false,mouse_drag = false,
    hold_shift = false,hold_ctrl = false,
    hold_scroll = false,mouse_in = false,
    repaint_f1 = false,repaint_f2 = false,repaint_f = false,
    repaint_main = true,repaint_main1 = true,repaint_main2 = true,
    form_text_cusor_hiden = true;
    
var shift_index = 0,
    last_choose = -1,
    selected_cusor = -1;

var grouph_by = window.GetProperty("Grouph by",0),
    auto_colapse = window.GetProperty("auto colapse",true),
    auto_exppant = window.GetProperty("auto exppant",true),
    show_scripts = window.GetProperty("show_scripts",true),
    grouph_option = window.GetProperty("grouph_option",""),
    search_async = window.GetProperty("search_async",true),
    font_size = window.GetProperty("font_size",20),
    library_path = window.GetProperty("Library path",""),
    istranparent = window.GetProperty("tranparent",true),
    heigh_row = window.GetProperty("heigh_row",30),
    Tooltip = window.GetProperty("Tooltip",false),
    Font_name = window.GetProperty("Font_name","Segoe UI"),
    time_delay_search = window.GetProperty("time_delay_search",200);
    
var g_tooltip = window.CreateTooltip(),
    time_tooltip = fb.CreateProfiler("Time tooltip"),
    tooltip_state = false,time_tooltip_ = 0;
    g_tooltip.Text = " ";   
    
var qsearch = "",
    qsearch_t = fb.CreateProfiler(),
    qsearch_lidx = [],qsearch_idx = 0;
    
g_tooltip.SetDelayTime(3, 0);    
    
var library_path_ = library_path.split(";");
var choose_playlist = plman.GetPlaylistItems(-1);
var time_debug = [],time_c = 0;
var color_text = RGB(153,141,249);//0xff998DF9; //================ Text Color
var background_color = 0xff000000;//================= Background Color
var choose_background_color = RGB(203,50,50)//0xFF8B0000;//============== Select Color
var alfa_fade_color = RGBA(40,30,20,150);//====================== Alfa fade Background (if dont need comment line 913)
var art_alb_sort = "\\%album artist%|%album%|%track number%|%title%";
var alb_sort = "\\%album%|%track number%|%title%";
var grouph_opt = grouph_option.split("|");

var g_font,g_font2,g_font3,g_font_q,g_font_marker;
var img_blend_1,img_blend_2;

var playlist_cache_name = "Media Library";

setfont();

var exppant_,
    research = false,
    search_done = false,
    research_k = 0;
    
vbe.Language = 'VBScript';
window.DlgCode = 0x0081 ;
var lib_search = "";



function indexer(){
    var total = list.Count;
    index_search = [];
    index_path = [];
    index_path_ = [];
    var TitleFormat = "[$if(%title%,$replace(%title%,'&','and'),'N/A')] ^^ %album artist% ^^ %album% ^^ %genre% ^^ $if(%path%,$replace(%path%,'&','and'),'N/A') ^^ %composer% ^^ %performer% ^^ %comment%";
    var FoobarTitleFormat = fb.TitleFormat(TitleFormat);
    var string = "", count = 0;
    for(var i = 0;i < total;i++){
        string = FoobarTitleFormat.EvalWithMetadb(list.Item(i));
        index_search[count] = string;
        index_search_[count] = string.toLowerCase();
        count++;
    }
    switch(grouph_by){
        case 0:
            for(var i = 0;i < total;i++){
                string = index_search[i].split(" ^^ ")[4];
                for(var j = 0;j < library_path_.length;j++)
                    string = string.replace(library_path_[j],"");
                index_path[i] = string.split("\\")[0];
            }
        break;
        case 1:
            for(var i = 0;i < total;i++){
                string = index_search[i].split(" ^^ ")[1];
                index_path[i] = (string.length < 2)?"Unknow Artist":string;
            }
        break;
        case 2:
            for(var i = 0;i < total;i++){
                string = index_search[i].split(" ^^ ")[2];
                index_path[i] = (string.length < 2)?"Unknow Album":string;
            }
        break;
        default:
            for(var i = 0;i < total;i++){
                index_path[i] = fb.TitleFormat(grouph_opt[0]).EvalWithMetadb(list.Item(i));
            }        
        break;
    }
}

function get_library(reload){fb
    var Time_library = fb.CreateProfiler("Time Out Refresh library");
    var pl_name = "", pl_idx = -1,list_;//,sort_patten;
    for(var i=0; i < plman.PlaylistCount; i++) {
        pl_name = plman.GetPlaylistName(i);
        if(pl_name == "Media Library") {
            pl_idx = i;
            break;
        }
    }
    switch(grouph_by){
        case 1:sort_patten = art_alb_sort;  break;
        case 2:sort_patten = alb_sort;      break;
        case 3:sort_patten = grouph_option; break;
    }
      
      if(pl_idx < 0) {
        pl_idx = plman.PlaylistCount;
        fb.CreateAutoPlaylist(pl_idx,"Media Library","ALL","");
		list = plman.GetPlaylistItems(pl_idx);
        (grouph_by == 0) && list.OrderByFormat(fb.TitleFormat("%path%"), 1);
        (grouph_by > 0) && list.OrderByFormat(fb.TitleFormat((grouph_by == 3)?grouph_option:art_alb_sort), 1);
        plman.InsertPlaylistItems(pl_idx,0,list);
    }else if(reload){
        fb.RemovePlaylist(pl_idx);
        fb.CreateAutoPlaylist(pl_idx,"Media Library","ALL","");
		list = plman.GetPlaylistItems(pl_idx);
        (grouph_by == 0) && list.OrderByFormat(fb.TitleFormat("%path%"), 1);
        (grouph_by > 0) && list.OrderByFormat(fb.TitleFormat((grouph_by == 3)?grouph_option:art_alb_sort), 1);
        plman.InsertPlaylistItems(pl_idx,0,list);
    }else 
		list = plman.GetPlaylistItems(pl_idx);
        (grouph_by == 0) && list.OrderByFormat(fb.TitleFormat("%path%"), 1);
        (grouph_by > 0) && list.OrderByFormat(fb.TitleFormat((grouph_by == 3)?grouph_option:art_alb_sort), 1);  
    
    test_perfomance();

        
    Time_library.Print();
    Time_library = fb.CreateProfiler("Time Out Indexer library");
    indexer();
    Time_library.Print();
}
get_library();



function match(input, str){
    for(var i in str){
        if(input.indexOf(str[i]) < 0)
            return false;
    }
    return true;
}


function prcess_string(str){
    str_ = [];
    str = str.toLowerCase();
    var str = str.split(" ").sort();
    for(var i in str){
        if(str[i] != "")
            str_.push(str[i]);
    }
    return str_;
}
var timeaaaa = fb.CreateProfiler();


function get_pl_tree(start,string_,force){
    var Time = fb.CreateProfiler();
    if(start == null){
        scroll = 0;start = 0;form_text_b_ = form_text;
        string_ = form_text;
        playlist = [];
        list_ = plman.GetPlaylistItems(-1);
        timeaaaa.Reset();
    }else if(form_text_b_ != form_text){
        fb.trace("Break -- -- -- -- Form text change");
        return;
    }
    var i = playlist.length,k = start,temp = "";
    str = prcess_string(form_text);
    var path = "",string_add = "",temp = "",string = "",total = list.Count,count = 0; 
    var string_compare = (i > 0)?(playlist[i-1].name):"123456789123456789";
    
    while(k < total){
        count = 0;
        while(count < 200 && k < total){
            count++;
            
            if(!match(index_search_[k],str)){
                k++;continue;
            }
            string = index_search[k];
            temp = index_path[k];
            if(string_compare.toUpperCase() != temp.toUpperCase()){
                string_compare = temp;
                playlist[i] = new Object();
                playlist[i].name = temp;
                playlist[i].alpha = 0;
                playlist[i].child = [];
                playlist[i].pl = plman.GetPlaylistItems(-1);
                playlist[i].pl.Add(list.Item(k));
                i++;
            }else{
                playlist[i-1].pl.Add(list.Item(k));
            }
            k++;
        }
        if(!force && Time.Time > 30){
            research = true;
            research_k = k;
            return;
        }
    }
    repaint_main1 = repaint_main2;
    //fb.trace("Timeout break : " + Time.Time);
    fb.trace("Searching Done : " + timeaaaa.Time/1000);
    tree_to_list(playlist,0);
    if(auto_exppant && playlist.length == 1)
        tree_expant(playlist[0]);
}

function tree_minimum(obj){
    obj.child = [];
    tree_to_list(playlist,0);
}

function tree_collasp(obj){
    var child_ = 0;
    if(obj.lv == 0){
        for(var i = 0;i < playlist.length;i++){
            child_ += playlist[i].child.length;
            playlist[i].child = [];
        }
    }else{
        var parrent = playlist_dr[obj.pr];
        for(var i = 0;i < parrent.child.length;i++){
            child_ += parrent.child[i].child.length;
            parrent.child[i].child = [];
        }
    }
    return child_;
}

function sorrt(a,b){
    return (a.name > b.name)?1:-1;
}

function tree_expant(obj){
    var i = 0,j = 0,k = 0;
    var path = "",string_compare = "123456789123456798",string_add = "",temp = "",meta,album_artist = "",title = "",item__ = false,track = "";
    var FoobarTitleFormat = fb.TitleFormat(" $caps([$num(%track number%,2). ] $if(%title%,$replace(%title%,'&','and'),'N/A') [- $if(%artist%,$replace(%artist%,'&','and'),'N/A')])");
    while(k < obj.pl.Count){
        path = get_fol_path(obj.pl.Item(k),obj.lv+1);
        if(obj.leaf){
            k++;
            continue;
        }
        item__ = false;
        if(path == "aaaaaa"){    
            path = FoobarTitleFormat.EvalWithMetadb(obj.pl.Item(k));
            item__ = true;
        }
        if(string_compare.toUpperCase() != path.toUpperCase()){
            string_compare= path; 
            obj.child[i] = new Object();
            obj.child[i].name = path;
            obj.child[i].alpha = 0;
            obj.child[i].child = [];
            obj.child[i].leaf = item__;
            obj.child[i].pl = plman.GetPlaylistItems(-1);
            obj.child[i].pl.Add(obj.pl.Item(k));
            i++;
        }else{
            obj.child[i-1].pl.Add(obj.pl.Item(k));
        }
        k++;
    }
    obj.child.sort(sorrt);
    tree_to_list(playlist,0);
    if(auto_exppant && obj.child.length == 1 && !obj.child[0].leaf){
        tree_expant(obj.child[0]);
    }
}


function tree_to_list(obj,lv){
    var parrent = playlist_dr.length - 1;
    if(lv == 0)
        playlist_dr = [];
    for(var i = 0;i < obj.length;i++){
        var idx = playlist_dr.length;
        playlist_dr[idx] = obj[i];
        playlist_dr[idx].lv = lv;
        playlist_dr[idx].pr = parrent;
        playlist_dr[idx].idx = idx;
        playlist_dr[idx].choose = false;
        if(exppant_ == obj[i])                    //=====================change
            scroll = (idx- Math.round(m_y/heigh_row-1.5))*heigh_row;//=====================change
        if(obj[i].child.length > 0){
            tree_to_list(obj[i].child,lv+1);
        }
    }
}

function get_fol_path(item,lv){
    switch(grouph_by){
        case 0:
            var string = item.Path;
            for(var i = 0;i < library_path_.length;i++)
                string = string.replace(library_path_[i],"");
            for(var i = 0;i < lv && string.indexOf("\\") != -1;i++)
                string = string.substr(string.indexOf("\\")+1);
            return (string.indexOf("\\") == -1)?("aaaaaa"):(string.substring(0,string.indexOf("\\")));
        break;
        case 1:
            switch(lv){
                case 0:
                    return fb.TitleFormat("$caps($if(%album artist%,%album artist%,Unknow Artist))").EvalWithMetadb(item);
                case 1:
                    return fb.TitleFormat("$caps($if(%album%,%album%,Unknow Album))").EvalWithMetadb(item);
                default:
                    return "aaaaaa";
            }
        break;
        case 2:
            if(lv == 0){
                return fb.TitleFormat("$caps($if(%album artist%,%album artist%,Unknow Artist) - $if(%album%,%album%,Unknow Album))").EvalWithMetadb(item);
            }else
                return "aaaaaa";
        break;
        default:
            if(lv < grouph_opt.length){
                return fb.TitleFormat(grouph_opt[lv]).EvalWithMetadb(item);
            }else
                return "aaaaaa";
        break;
    }
}

var tmp_out;
function on_size(){
    ww = window.Width;
    wh = window.Height;
    scroll_++;
    repaint_main1 = repaint_main2;
    repaint_f1 = repaint_f2;
    tmp_out && window.ClearInterval(tmp_out);
    tmp_out = window.SetInterval(function(){
        if(window.IsVisible){
            img_blend_2 = null;
            create_blend();
            repaint_main1 = repaint_main2;
            repaint_f1 = repaint_f2;
            tmp_out && window.ClearInterval(tmp_out);
        }
    },500);
}

function get_cusor_index(x){
    var result = form_text.length;
    while(char_index[result] > x )
        result--;
    return (result > 0)?result:0;
}

function refresh_char_index(gr){
    char_index = [];
    for(var i = 0;i < form_text.length + 1;i++)
        char_index[i] = gr.EstimateLineWrap(form_text.substr(0,i),g_font,ww).toArray()[1];
}
//=====================================================
function on_mouse_lbtn_up(x,y,mask){
    lbdn = 0;
    y_start = y;
    if(mouse_drag && x > ww)
        add_playlist(choose_playlist);
    mouse_drag = mouse_hold = mouse_l_hold = mouse_l_hold_f = hold_scroll = false;
    var tam = Math.round((y + scroll - heigh_row * 1.5)/heigh_row);
    if(y > heigh_row && tam < playlist_dr.length && tam >= 0 && check_item(playlist_dr[tam],x,y)){
        (mm_x == x && mm_y == y && !utils.IsKeyPressed(0x11)) && on_chose(tam,!(mm_x == x && mm_y == y));
    }
}

function on_mouse_lbtn_dblclk(x,y,mask){
    var tam = Math.round((y + scroll - heigh_row*1.5)/heigh_row);
    if(y > heigh_row && tam < playlist_dr.length && tam >= 0 && check_item(playlist_dr[tam],x,y))
         apply_playlist(playlist_dr[tam].pl);
    else if(y < heigh_row)
        on_mouse_lbtn_down(x,y,1.5);
    else
        on_mouse_lbtn_down(x,y,mask);
}


function check_item(obj,x,y){
    if(!obj) return false;
    return (x - slide_r > (heigh_row * (obj.lv + 1)) && x - slide_r < (heigh_row * (obj.lv + 1) + obj.rg));
}
//======================================================
function on_mouse_lbtn_down(x,y,mask){
    lbdn = 1;
    y_start = y;
    g_drag = false;
    mouse_l_hold_f = on_form = (y < heigh_row);
    mouse_l_hold = !mouse_l_hold_f;
    if(y < heigh_row){    
        if(x < ww - heigh_row){
            form_text_cusor = get_cusor_index(x);
            repaint_f1 = repaint_f2;
            form_text_cusor_hiden = true;
            time111 = (new Date()).getTime();
            if(mask == 1.5){
                bold_start = (" " + form_text + " ").lastIndexOf(" ",form_text_cusor);
                bold_end = (" " + form_text + " ").indexOf(" ",form_text_cusor+1)-1;
            }else
                bold_start = bold_end = form_text_cusor;
        }else if(x > ww - heigh_row){
            bold_start = bold_end = form_text_cusor = 0;
            form_text = "";
            time333 = (new Date()).getTime() + 800;
        }
        return;
    }
    if(y > heigh_row ){
        var tam = Math.round((y + scroll - heigh_row * 1.5)/heigh_row);
        if(tam < playlist_dr.length && tam >= 0){
            var playlist_tmp = playlist_dr[tam];
            if(heigh_row * (playlist_tmp.lv + 1)> x - slide_r && heigh_row * playlist_tmp.lv < x - slide_r){
                //TREE EXPANT OR COLAPSE
                if(playlist_tmp.child.length > 0){
                    tree_minimum(playlist_tmp);
                }else{
                    exppant_ = playlist_tmp;
                    auto_colapse && tree_collasp(playlist_tmp); 
                    tree_expant(playlist_tmp); //tree_expant(playlist_dr[tam])
                }
            }else if(check_item(playlist_tmp,x,y)){
                //ITEM CHOOSE
                mm_x = x;mm_y = y;
                mouse_drag = true;
                if(!playlist_tmp.choose){
                    on_chose(tam,playlist_tmp.choose);
                    selected_cusor = tam;
                    mouse_hold = true;
                }
                else if(utils.IsKeyPressed(0x11)){
                    on_chose(tam,playlist_tmp.choose);
                }
            }else
                on_chose(-1);
            repaint_main1 = repaint_main2;
            repaint_f1 = repaint_f2;
        }else
            on_chose(-1);
    }
    if(playlist_dr.length * heigh_row > wh && x > ww - 8){
        hold_scroll = true;
        scroll = Math.round((((y - heigh_row) * (playlist_dr.length * heigh_row ) / (wh - heigh_row)) - (wh - heigh_row)/2)/heigh_row-0.5)*heigh_row;
    }
}

function on_chose(index,mouse_up){
    repaint_main1 = repaint_main2;
    if(index == -1){
        for(var k = 0;k < playlist_dr.length;k++)
            playlist_dr[k].choose = false;
    }else if((utils.IsKeyPressed(0x10) || mouse_hold) && last_choose > -1){
        choose_playlist = plman.GetPlaylistItems(-1);
        var dd = (index > last_choose)?1:-1;
        if(!utils.IsKeyPressed(0x11)){
            for(var k = 0;k < playlist_dr.length;k++)
                playlist_dr[k].choose = false;
        }
        for(var k = last_choose; ;k += dd){
            playlist_dr[k].choose = true;
            choose_playlist.AddRange(playlist_dr[k].pl);
            if(k==index)
                break;
        } 
        repaint_main1 = repaint_main2;
    }else if(utils.IsKeyPressed(0x11)){
        playlist_dr[index].choose = !(playlist_dr[index].choose);
        playlist_dr[index].choose && choose_playlist.AddRange(playlist_dr[index].pl);
        last_choose = index;
    }else if(!mouse_up){
        choose_playlist = plman.GetPlaylistItems(-1);
        for(var k = 0;k < playlist_dr.length;k++)
            playlist_dr[k].choose = false;
        playlist_dr[index].choose = true;
        choose_playlist.AddRange(playlist_dr[index].pl);
        last_choose = index;
    }
}

function check_playlist(name){
    var pl_name = "", pl_idx = -1;
    for(var i=0; i < plman.PlaylistCount; i++) {
        pl_name = plman.GetPlaylistName(i);
        if(pl_name == name) {
            pl_idx = i;
            break;
        }
    }
    return pl_idx;
}


function on_char(code){
    time333 = (new Date()).getTime();
    var input = String.fromCharCode(code);
    if(on_form){
        form_text_cusor_hiden = true;
        selected_cusor = -1;
        switch(code){
            case 13://ENTER
                if(form_text.length < 3)
                    break;
                str = prcess_string(form_text);
                var total = list.Count;
                var pltemp = plman.GetPlaylistItems(-1);
                for(var i = 0;i < total;i++)
                    if(match(index_search_[i],str))
                        pltemp.Add(list.Item(i));
                apply_playlist(pltemp);
                pltemp.Dispose();         
            break;
            case 25: 
                form_his.push(form_text);
                if(form_his.length > 30) form_his.shift();
                if(form_his_.length > 0) form_text = form_his_.pop() + "";
                break;
            case 26:
                form_his_.push(form_text);
                if(form_his_.length > 30) form_his.shift();
                if(form_his.length > 0) form_text = form_his.pop() + "";
            break;
            
            case 1://CTRL + A
                bold_start = 0;
                bold_end = form_text.length;
            break;
            
            case 3: // COPPY
                (bold_start != bold_end) && htmlfile.parentWindow.clipboardData.setData('text',form_text.substring(bold_start,bold_end));
            break;
            
            case 24://CUT
                (bold_start != bold_end) && htmlfile.parentWindow.clipboardData.setData('text',form_text.substring(bold_start,bold_end));
            case 8://DELETE
                save_form_his();
                if(bold_start == bold_end){
                    form_text = form_text.substring(0,form_text_cusor-1) + form_text.substring(form_text_cusor,200);
                    if(form_text_cusor > 0)
                        form_text_cusor--;
                    bold_end = bold_start = form_text_cusor;
                }else{
                    form_text = form_text.substring(0,bold_start) + form_text.substring(bold_end,200);
                    form_text_cusor = bold_start;
                    bold_end = bold_start;
                }
            break;

            case 22://CTRL + V//PASTE
                input = htmlfile.parentWindow.clipboardData.getData('text');
            default: //CHAR
                save_form_his();
                if(char_index[form_text.length] + heigh_row >= ww - 10)
                    break;
                if(bold_start == bold_end){
                    form_text = form_text.substring(0,form_text_cusor) + input + form_text.substring(form_text_cusor,200);
                    form_text_cusor += input.length;
                    bold_end = bold_start = form_text_cusor;
                }else{
                    form_text = form_text.substring(0,bold_start) + input + form_text.substring(bold_end,200);
                    form_text_cusor = bold_start + input.length;
                    bold_end = bold_start;
                }
            break;
        }
        repaint_f1 = repaint_f2;
    }else{
        //============================================================qsearch_t
        var str,end_,lg,i,search_ = true;
        qsearch_t.Reset();
        switch(code){
            case 13://ENTER
                qsearch = "";
                break;
            case 8://DELETE
                qsearch = qsearch.substr(0,qsearch.length - 1);
                break;
            case 60: case 44:
                qsearch_idx--;
                search_ = false;
                break;
            case 62: case 46:
                qsearch_idx++;
                search_ = false;
                break;
            case 39 : case 37 :
                search_ = false;
                break;
            break;
            default:
                qsearch += input;
            break;
        }
        str = prcess_string(qsearch == ""?"@@@@":qsearch);
        choose_playlist = plman.GetPlaylistItems(-1);
        end_ = playlist_dr.length; 
        if(search_){
            str = prcess_string(qsearch == ""?"@@@@":qsearch);
            qsearch_lidx = [];
            for(i = 0;i < end_;i++){//String.toLowerCase
                if(match(playlist_dr[i].name.toLowerCase(),str)){
                    qsearch_lidx[qsearch_lidx.length] = i;
                    playlist_dr[i].choose = true;
                    choose_playlist.AddRange(playlist_dr[i].pl);
                }else
                    playlist_dr[i].choose = false;
            }
        }else
            for(i = 0;i < end_;i++) playlist_dr[i].choose = false;
        lg = qsearch_lidx.length;
        qsearch_idx += lg;
        if(lg != 0){ 
            selected_cusor = qsearch_lidx[qsearch_idx%lg];
            scroll = (selected_cusor - 5) * heigh_row;
            !search_ && on_chose(selected_cusor);
        }
        
        repaint_main1 = repaint_main2;
    }
}

function save_form_his(){
    if(time_h.Time < 100)
        return;
    form_his.push(form_text);
    form_his_ = [];
    if(form_his.length > 30) form_his.shift();
    time_h.Reset();
}

function on_key_down(vkey) {
    switch(vkey){
        case 0x25:case 0x27:
            if(on_form){
                if(vkey == 0x25 && form_text_cusor > 0)
                    form_text_cusor--;
                if(vkey == 0x27 && form_text_cusor < form_text.length)
                    form_text_cusor++;            
                if(hold_shift){
                    bold_start = Math.min(form_text_cusor,shift_index);
                    bold_end   = Math.max(form_text_cusor,shift_index);
                }else
                    bold_start = bold_end = form_text_cusor;
            }else if(selected_cusor >= 0){
                on_form = false;
                if(vkey == 0x25){
                    if(playlist_dr[selected_cusor].child.length > 0){
                        var tmp = playlist_dr[selected_cusor];
                        tree_minimum(tmp);
                        on_chose(tmp.idx);
                        selected_cusor = tmp.idx;                         
                    }else try{
                        var tmp = playlist_dr[playlist_dr[selected_cusor].pr];
                        tree_minimum(tmp);
                        on_chose(tmp.idx);
                        selected_cusor = tmp.idx;
                    }catch(err){ };
                }else{
                    var tmp = playlist_dr[selected_cusor];
                    auto_colapse && tree_collasp(tmp); 
                    tree_expant(tmp);
                    on_chose(tmp.idx);
                    selected_cusor = tmp.idx;
                }
                if((selected_cusor + 1 ) * heigh_row > (scroll + wh))
                    scroll = (selected_cusor + 2) * heigh_row - Math.round(wh / heigh_row)* heigh_row;
                else if((selected_cusor - 1) * heigh_row - scroll < 0)    
                    scroll = (selected_cusor - 1) * heigh_row;
                repaint_main1 = repaint_main2;
            }
        break;
        case 0x10:
            hold_shift = true;
            shift_index = form_text_cusor;
        break;
        case 0x11:
            hold_ctrl = true;
        break;
        case 13:
            if(on_form)return;
            if(choose_playlist.Count == 0) return;
            //apply_playlist(choose_playlist);
            add_playlist(choose_playlist);//================================== Add to playlist(Shift + Enter)
        break;
        case 40:case 38:
            if(playlist_dr.length == 0)
                break;
            if((selected_cusor == 0 && vkey == 38)||(selected_cusor == playlist_dr.length - 1 && vkey == 40)){
                repaint_main1 = repaint_main2;   
                form_text_cusor_hiden = !form_text_cusor_hiden;
                on_form = true;
                on_mouse_lbtn_down(ww - 21,10,0);
                on_chose(-1);
                break;
            }
            (vkey == 40) && selected_cusor++;
            (vkey == 38) && selected_cusor--;
            
            selected_cusor = (selected_cusor + playlist_dr.length)% playlist_dr.length;

            if((selected_cusor + 2) * heigh_row - (scroll + wh - heigh_row) > 0)
                scroll = (selected_cusor + 3) * heigh_row - Math.round(wh / heigh_row - 1)* heigh_row;
            else if((selected_cusor - 1) * heigh_row - scroll < 0)    
                scroll = (selected_cusor - 1) * heigh_row;
            
            on_chose(selected_cusor);
            
            on_form = false;
            repaint_main1 = repaint_main2;
        break;
        case 46:
            on_key_down(39);
            on_char(8);
        break;
    }
    repaint_f1 = repaint_f2;
    form_text_cusor_hiden = true;
}

function on_key_up(vkey){
    switch(vkey){
        case 0x10:
            hold_shift = false;
            shift_index = form_text_cusor;
        break;
        case 0x11:
            hold_ctrl = false;
        break; 
    }
}

//======================================================Touch mod
function on_mouse_move(x,y){
    
    if (lbdn) {
           y_end = y;
           y_delta = (y_end - y_start);    
      if (x < ww){
	       
      if (y_delta > wh/25) {
         on_mouse_wheel(1);
	     repaint_f1 = repaint_f2;
         y_start = y_end;  
    } 
      if (y_delta < -wh/25) {
	     on_mouse_wheel(-1);
	     repaint_f1 = repaint_f2;
         y_start = y_end;   
	};

}
scroll = check_scroll(scroll);   
}
       
    if(m_x == x && m_y == y)
        return;
    mouse_in = true;
    if(y < heigh_row && x < ww - heigh_row)
        window.SetCursor(32512);
    else
        window.SetCursor(32512);
    if(y < heigh_row && mouse_l_hold_f){
        bold_start = form_text_cusor;
        bold_end = get_cusor_index(x);
        if(bold_start > bold_end){
            var tam = bold_start;
            bold_start = bold_end;
            bold_end = tam;
        }
        repaint_f1 = repaint_f2;
    }
    if(m_x > ww-heigh_row && m_y < heigh_row)
        //repaint_f1 = repaint_f2;
    m_x = x;m_y = y;
    var tam = Math.round((y - heigh_row*1.5)/heigh_row);
    if(tam < playlist_dr.length && tam >= 0){
        repaint_main1 = repaint_main2;
    }
    if(hold_scroll){
        scroll = Math.round((((y - heigh_row) * (playlist_dr.length * heigh_row ) / (wh - heigh_row)) - (wh - heigh_row)/2)/heigh_row-0.5)*heigh_row;
    }
    time_tooltip.Reset();
}

function on_mouse_leave(){
    m_x = x_y = 0;
    mouse_drag = mouse_hold = mouse_in = false;
}
//====================================================================APPLY & ADD TO PL
function apply_playlist(playlist){
    var pl_idx = check_playlist("Library view");
    if(pl_idx == -1){
        pl_idx = fb.PlaylistCount; 
        fb.CreatePlaylist(pl_idx,"Library view");
    }else{
        fb.ActivePlaylist = pl_idx;
        fb.RunMainMenuCommand("Edit/Clear");
    }
    fb.ActivePlaylist = pl_idx;
    var playlist_ = playlist.Clone();
    //playlist_.OrderByFormat(fb.TitleFormat("$if([%album artist%],%album artist%,zzzz)|$if([%album%],[%date%]%album%,zzzz)|$if(%track number%,%track number%,zzzz)|$sub(5,%rating%)|%title%"),1);
    playlist_.OrderByFormat(fb.TitleFormat("%path%"),1);
    plman.InsertPlaylistItems(pl_idx,1,playlist_);
    fb.ActivePlaylist = pl_idx;
    plman.ExecutePlaylistDefaultAction(pl_idx,0);
    fb.RunMainMenuCommand("Edit/Remove Duplicates");
}

function add_playlist(playlist){
    //playlist.OrderByFormat(fb.TitleFormat("$if([%album artist%],%album artist%,zzzz)|$if([%album%],[%date%]%album%,zzzz)|$if(%track number%,%track number%,zzzz)|$sub(5,%rating%)|%title%"),1);
    playlist.OrderByFormat(fb.TitleFormat("%path%"),1);
    plman.InsertPlaylistItems(fb.ActivePlaylist,plman.PlaylistItemCount(fb.ActivePlaylist),playlist);
    fb.RunMainMenuCommand("Edit/Remove Duplicates");
}

function on_mouse_mbtn_down(x,y,mask){
    var tam = Math.round((y + scroll - heigh_row*1.5)/heigh_row);
    if(y > heigh_row && tam < playlist_dr.length && tam >= 0)
        check_item(playlist_dr[tam],x,y) && add_playlist(playlist_dr[tam].pl);
}
//======================================================= On Paint
function on_paint(gr){
    !window.IsTransparent && gr.FillSolidRect(0, 0, ww, wh, 0xff000000);
    gr.FillSolidRect(0, 0, ww, wh, alfa_fade_color);//-----> Alfa Fade (if dont need comment//)
    if(!repaint_main && !repaint_f)
        repaint_main = repaint_f = true;
    if(repaint_main){
        repaint_main = false;
        var index = 0,j = 0,start_ = 0,end_ = 0,alpha = 0;
        var count_,head_,name_,width_,left_mg;
        var width_aaa = gr.CalcTextWidth("(+) ",g_font);
        start_ = Math.round(scroll_/heigh_row + 0.4);
        end_ = Math.round((scroll_ + wh)/heigh_row - 0.5);
        end_ = (playlist_dr.length < end_)?playlist_dr.length:end_;
        for(var i = start_;i < end_;i++){
            alpha = (playlist_dr[i].alpha<<24)|0xffffff;
            count_ = (playlist_dr[i].pl.Count >1)?(" (" +playlist_dr[i].pl.Count + ")"):("");
            head_ = playlist_dr[i].leaf?"• ":((playlist_dr[i].child.length < 1)?"[+] ":"[--] ");
            name_= head_ + playlist_dr[i].name + count_ + "";
            width_ = gr.CalcTextWidth(name_,g_font) - (playlist_dr[i].leaf?0:width_aaa) + heigh_row * 0.2;
            playlist_dr[i].rg = width_  - (playlist_dr[i].leaf?heigh_row:0);
            playlist_dr[i].choose  ?(playlist_dr[i].alpha += time_dl * 2)
                                    :((mouse_index != i) && (playlist_dr[i].alpha -= time_dl * 0.7));
            playlist_dr[i].alpha = Math.max(0,Math.min(255,playlist_dr[i].alpha));
            (playlist_dr[i].alpha % 255 !=0) && (repaint_main1 = repaint_main2);
            (playlist_dr[i].alpha > 0) && gr.FillSolidRect((heigh_row * playlist_dr[i].lv) + (playlist_dr[i].leaf?0:width_aaa) + slide_r,Math.floor((i + 1)* heigh_row - scroll_ + 1),width_,Math.floor(heigh_row*0.95),(choose_background_color & alpha));
            playlist_dr[i].choose && gr.DrawRect((heigh_row * playlist_dr[i].lv) + (playlist_dr[i].leaf?0:width_aaa) + slide_r,Math.floor((i + 1)* heigh_row - scroll_ + 1),width_, Math.floor(heigh_row*0.95 - 1),1,0x30FFFFFF);
            left_mg = heigh_row * (playlist_dr[i].lv + 0.1);
            gr.GdiDrawText(name_, g_font, color_text,left_mg + slide_r,heigh_row * (i + 1.1)- scroll_-5, ww - left_mg, heigh_row, 0);   
        }
        // Draw Qsearch
        gr.SetSmoothingMode(4);
        if(qsearch_t.Time < 500 && qsearch != ""){
            var wid = gr.CalcTextWidth(qsearch,g_font_q) + 25;
            var hei = heigh_row * 1.5;
            gr.DrawRoundRect(ww/2 - wid/2, wh/2 - hei/2, wid, hei, 5, 5, heigh_row * 0.1, 0xaaffffff);
            gr.FillRoundRect(ww/2 - wid/2, wh/2 - hei/2, wid, hei, 5, 5, 0x77000000);
            gr.GdiDrawText(qsearch, g_font_q, 0xff000000,ww/2 - wid/2 + 2, wh/2 - hei/2 + heigh_row * 0.2 + 2, wid, hei, 0x05);   
            gr.GdiDrawText(qsearch, g_font_q, color_text,ww/2 - wid/2, wh/2 - hei/2 + heigh_row * 0.2, wid, hei, 0x05);  
        }
        
        

        //Draw Scoll Bar
        if(playlist_dr.length * heigh_row > wh - heigh_row){
            var hei = playlist_dr.length * heigh_row;
            //gr.FillGradRect(ww-7,heigh_row,7,wh-heigh_row,0,0x60000000,0x60000000);
            gr.FillGradRect(ww-6,heigh_row + (scroll_*(wh-heigh_row)/hei),5,((wh-heigh_row)*(wh-heigh_row)/hei)-1,0,hold_scroll ? 0xa0aaaaaa:0xa0ffffff ,hold_scroll ? 0xa0aaaaaa:0xa0ffffff);
        }
        //Draw Blend
        if(img_blend_2)
            gr.GdiAlphaBlend(img_blend_2,0,wh * 39 / 40,ww,img_blend_2.Height,0,1,ww,img_blend_2.Height - 1,255);
    }
    if(repaint_f){
        repaint_f = false;
        //!window.IsTransparent && gr.FillSolidRect(0, 0, ww, heigh_row, 0x80555555);
        //!window.IsTransparent && gr.DrawRect(0, 0, ww, heigh_row, 1,0x70ffffff);
        //refresh_char_index(gr);
        //bold_start      = Math.max(bold_start,0);
        //bold_end        = Math.max(bold_end,0);
        //form_text_cusor = Math.max(form_text_cusor,0);
        //bold_start      = Math.min(bold_start,form_text.length);
        //bold_end        = Math.min(bold_end,form_text.length);
        //form_text_cusor = Math.min(form_text_cusor,form_text.length);
        //gr.DrawLine(0,heigh_row/2,ww,heigh_row/2,heigh_row,on_form?0x60222222:0x60000000);
        //on_form && form_text_cusor_hiden && (bold_start == bold_end) && gr.DrawLine(char_index[form_text_cusor] + heigh_row/10,heigh_row/10,char_index[form_text_cusor] + heigh_row/10,heigh_row*0.9,1,color_text);
        //bold_end = (bold_end < form_text.length)?bold_end:form_text.length;
        
        //(bold_start != bold_end) && gr.DrawLine(char_index[bold_start] + heigh_row/10,heigh_row/2,char_index[bold_end] + heigh_row/10,heigh_row/2,heigh_row-3,choose_background_color);
        
        //gr.GdiDrawText(form_text, g_font, color_text, heigh_row/10, heigh_row/10-5, ww, heigh_row, 0);
        
        //(form_text == "") && gr.GdiDrawText("Search . . .", g_font3, RGB(105,105,105), heigh_row/10, heigh_row/10-5, ww, heigh_row, 0);
        
        //gr.DrawLine(ww-heigh_row*0.8,heigh_row*0.8,ww - heigh_row*0.2,heigh_row*0.2,heigh_row/10,(m_x > ww-heigh_row && m_y < heigh_row)?0xf0ffffff:RGB(105,105,105));
        //gr.DrawLine(ww-heigh_row*0.8,heigh_row*0.2,ww - heigh_row*0.2,heigh_row*0.8,heigh_row/10,(m_x > ww-heigh_row && m_y < heigh_row)?0xf0ffffff:RGB(105,105,105));
    }
}
//===============================================================ON TIMER
function on_timer(g_time333){
    if(!window.IsVisible)
        return;
    on_timer_(g_time333);
}

function on_timer_(g_time333){
    var repaint_1 = false,repaint_2 = false; 
    time_dl = time_s.Time;
    time_s.Reset();
    if(research){
        research = false;
        get_pl_tree(research_k,form_text);
        return;
    }        
    
    var d = new Date();
    if(d.getTime() - time222 < 15)
        return
    else
        time222 = d.getTime();

    if(d.getTime() - time333 > time_delay_search && on_form && form_text_b != form_text){
        time333 = d.getTime();
        form_text_b = form_text;
        lib_search = form_text;
        get_pl_tree();
    }
    
    mouse_index = -1;
    var tam = check_item_index(m_x,m_y);
    
    if(tam != -1){
        if(qsearch == "")
            playlist_dr[tam].alpha = Math.min(playlist_dr[tam].alpha + 40,255);
        if(m_tam != tam){
            mouse_hold && on_chose(tam);
            deactive_tooltip();
        }else{
            Tooltip && (time_tooltip_ += time_dl);
        }
        if(Tooltip && time_tooltip_ > 3000  && !tooltip_state && (heigh_row * (playlist_dr[tam].lv + 1) + playlist_dr[tam].rg) > ww && playlist_dr[tam].alpha > 250){
            g_tooltip.Width = playlist_dr[tam].rg;
            g_tooltip.Height = heigh_row;
            active_tooltip();
            g_tooltip.TrackPosition(heigh_row * (playlist_dr[tam].lv + 1), Math.floor((m_y+1) / heigh_row) * heigh_row - 1);
            g_tooltip.Text = " ";
        }else
            deactive_tooltip();
        mouse_index = tam;
        m_tam = tam;
    }
    
    if(qsearch_t.Time > 1500 && qsearch != ""){
        repaint_2 = true;
        qsearch = "";
    }
    if(time_tooltip.Time > 7000){
        deactive_tooltip();
    }

    
    if(d.getTime() - time111 > 600 && on_form){
        form_text_cusor_hiden = !form_text_cusor_hiden;
        time111 = d.getTime();
        repaint_1 = true;
    }

    if(repaint_f1 == repaint_f2){
        repaint_f2 = !repaint_f1;
        repaint_1 = true;
    }
    
    if(repaint_main1 == repaint_main2){
        repaint_main2 = !repaint_main1;
        repaint_2 = true;
    }
    
    scroll = check_scroll(scroll);
    
    if(Math.abs(scroll - scroll_) > 0.5){
        scroll___ += (scroll - scroll___) * (1-Math.pow(0.9,time_dl/4));
        scroll__ += (scroll___ - scroll__) * (1-Math.pow(0.9,time_dl/4));
        scroll_ += (scroll__ - scroll_) * (1-Math.pow(0.9,time_dl/4));
        time_tooltip.Reset();
        repaint_2 = true;
    }
    if(repaint_1 && repaint_2){
        time_s.Reset();
        repaint_main = true;
        repaint_f = true;
        window.Repaint();
    }else if(repaint_1){
        repaint_f = true;
        window.RepaintRect(0,0,ww,heigh_row,true);
    }else if(repaint_2){
        repaint_main = true;
        time_s.Reset();
        window.RepaintRect(0,heigh_row,ww,wh-heigh_row,true);
    }
}

function check_item_index(x,y){
    var tam = Math.round((y + scroll_ - heigh_row*1.5)/heigh_row);
    if(playlist_dr.length > tam && tam >= 0 && x < ww -10 && y > heigh_row && check_item(playlist_dr[tam],x,y))
        return tam;
    else return -1;
}

var notifi = true;
function setfont(){
    if(!utils.CheckFont(Font_name)){
        notifi && fb.ShowPopupMessage("Stub image not found.\r\nGo to Properties to config Stub image path.");
        notifi = false;
    }
    g_font  = gdi.Font(Font_name, font_size, 0);
    g_font2 = gdi.Font(Font_name, font_size, 1);
    g_font3 = gdi.Font(Font_name, font_size, 2);
    g_font_q = gdi.Font(Font_name, font_size*1.5, 2);//    g_font_q = gdi.Font("Tahoma", font_size + 10, 2),
    g_font_marker = gdi.Font(Font_name, font_size, 1);
}
//===================================================Wheel step
function on_mouse_wheel(step){
    if(utils.IsKeyPressed(0x11)){
        font_size += step;
        if(font_size > 60)
            font_size = 60;
        else if(font_size < 20)
            font_size = 20;
        window.SetProperty("font_size",font_size);
        setfont();
        scroll = scroll_ = scroll__ = scroll___ = scroll/heigh_row;
        heigh_row = Math.floor(font_size*16/11);
        scroll = scroll_ = scroll__ = scroll___ = scroll * heigh_row;
        window.SetProperty("heigh_row",heigh_row);
        repaint_f1 = repaint_f2;repaint_main1 = repaint_main2;
        return;
    }
    repaint_main1 = repaint_main2;
    scroll -= step*heigh_row*1;
    scroll = check_scroll(scroll);
}

function check_scroll(scroll___){
    scroll___ = Math.round(scroll___ / heigh_row ) * heigh_row;
    if(scroll___ > ((playlist_dr.length + 2 )* heigh_row - wh ))
        scroll___ = Math.round(((playlist_dr.length + 2 )* heigh_row - wh )/heigh_row - 0.5)*heigh_row;
    if(playlist_dr.length*heigh_row < wh - heigh_row)
        scroll___ = 0;
    if(scroll___ < 0)
        scroll___ = 0;
    return scroll___;
}

function on_mouse_rbtn_up(x, y){
    var MF_SEPARATOR = 0x00000800;
    var MF_STRING = 0x00000000;
    var _menu = window.CreatePopupMenu();
    var _menu1 = window.CreatePopupMenu();
    var Context = fb.CreateContextMenuManager();
    var con_ = false,time_111,idx;
    _menu1.AppendMenuItem(MF_STRING, 2, "Grouph by Path");
    _menu1.AppendMenuItem(MF_STRING, 3, "Grouph by Artist - Album");
    _menu1.AppendMenuItem(MF_STRING, 4, "Grouph by Album");
    _menu1.AppendMenuItem(MF_STRING, 5, "Grouph by User");
    _menu1.AppendMenuSeparator();
    _menu1.AppendMenuItem(MF_STRING, 11, "Auto Exppant");
    _menu1.AppendMenuItem(MF_STRING, 12, "Auto Collapse");
    _menu1.AppendMenuItem(MF_STRING, 15, "Tooltip");
    _menu1.AppendMenuSeparator();
    _menu1.AppendMenuItem(MF_STRING, 9, "Reefresh Library");
    _menu1.AppendMenuItem(MF_STRING, 13, "Configure Library Path");
    show_scripts && _menu1.AppendMenuItem(MF_STRING, 1, "Show Configure Scripts");
    _menu1.AppendMenuItem(MF_STRING, 100, "Show Properties");
	_menu1.CheckMenuRadioItem(2, 5,grouph_by + 2);
    _menu1.CheckMenuItem(11,auto_exppant);
    _menu1.CheckMenuItem(12,auto_colapse);
    _menu1.CheckMenuItem(15,Tooltip);
    
    var tam = Math.round((y + scroll_ - heigh_row*1.5)/heigh_row);
    if(y > heigh_row && playlist_dr.length > tam && tam >= 0 && x < ww - heigh_row/2 && check_item(playlist_dr[tam],x,y)){
        !playlist_dr[tam].choose && on_chose(tam);
        _menu.AppendMenuItem(MF_STRING, 21, "Send to Playing Playlist");
        _menu.AppendMenuItem(MF_STRING, 22, "Add to Playing Playlist");
        con_ = true;
    } else 
         on_chose(-1);
    _menu1.AppendTo(_menu,MF_STRING, "Preferences");
    if(con_){
        _menu.AppendMenuSeparator();
        Context.InitContext(choose_playlist);
        Context.BuildMenu(_menu, 30, -1);
    }
    idx = _menu.TrackPopupMenu(x,y);

    switch(idx) {
        case 1:
            window.ShowConfigure();
        break;
        case 2:case 3:case 4:case 5:
            grouph_by = idx-2;
            window.SetProperty("Grouph by",grouph_by);
            get_library(2);
            get_pl_tree();
            repaint_f1 = repaint_f2;
            repaint_main1 = repaint_main2;
        break;
        case 9:
            get_library(1);
            get_pl_tree();            
            repaint_f1 = repaint_f2;
            repaint_main1 = repaint_main2;
        break;
        case 11:
            auto_exppant = !auto_exppant;
            window.SetProperty("auto exppant",auto_exppant);
            get_pl_tree();
            repaint_f1 = repaint_f2;
            repaint_main1 = repaint_main2;
        break;
        case 12:
            auto_colapse = !auto_colapse;
            window.SetProperty("auto colapse",auto_colapse);
            get_pl_tree();
            repaint_f1 = repaint_f2;
            repaint_main1 = repaint_main2;
        break;
        case 13:
            var lib_filter = vbe.eval("InputBox(\"Example : \" + chr(10) + \"D:\\music\\;D:\\lossless\\\" + chr(10) + \"NULL to reset default\",\"Edit library Path\",\"" + library_path + "\")");
            if(lib_filter == "NULL" || lib_filter == "null")
                library_path = "E:\\music\\lossless\\;E:\\music\\lossly\\320kps\\";
            else if(lib_filter)
                library_path = lib_filter;
            library_path_ = library_path.split(";");
            window.SetProperty("Library path",library_path);
            get_library(1);
            get_pl_tree();            
            repaint_f1 = repaint_f2;
            repaint_main1 = repaint_main2;
        break;
        case 15:
            Tooltip = !Tooltip;
            window.SetProperty("Tooltip",Tooltip);
        break;
        case 21:
            apply_playlist(choose_playlist);
        break;
        case 22:
            add_playlist(choose_playlist);
        break;
        case 100:
            window.ShowProperties();
        break;
        default:
            con_ && Context.ExecuteByID(idx-30);
        break;
    }
    _menu.Dispose();
    _menu1.Dispose();
    Context.Dispose();
    return true;
}

function active_tooltip(){
    if(!tooltip_state){
        tooltip_state = true;
        g_tooltip.Activate();
        g_tooltip.TrackActivate = true;
    }
}

function deactive_tooltip(){

    if(tooltip_state){
        tooltip_state = false;
        g_tooltip.TrackActivate = false;
        g_tooltip.Deactivate();
        time_tooltip_ = 0;
        time_tooltip.Reset();
    }
}

function on_tooltip_custom_paint(gr){
    var tam = check_item_index(m_x,m_y);
    var dr_str = playlist_dr[tam].name + (playlist_dr[tam].leaf?(""):(" (" + playlist_dr[tam].pl.Count + ")"));
    gr.GdiDrawText(dr_str, g_font, 0xaa333333,font_size * 0.2,heigh_row * 0.1,playlist_dr[tam].rg, heigh_row, 0x804);   
}

function create_blend(){
    ww = window.Width;
    wh = window.Height;
    try{
        background = window.GetBackgroundImage();
        x = Math.ceil(wh/40 * 39) - 1;
        w = background.Height - x;
        img1 = background.Clone(0,x ,ww,w);
        var tmp = gdi.CreateImage(ww,w);
        var gr = tmp.GetGraphics();
        gr.FillGradRect(0,0,ww,wh/40,270,0xff000000,0xffffffff,1);
        gr.FillGradRect(0,wh/80,ww,wh/80,270,0xaa000000,0x00ffffff,1);
        tmp.ReleaseGraphics(gr);
        img1.ApplyMask(tmp);
        img_blend_2 = img1.CreateRawBitmap();       
    }catch(err){}
}



var a000001 = window.SetTimeout(function(){
    get_library();
    if(form_text == ""){
        get_pl_tree();
        repaint_f1 = repaint_f2;
        repaint_main1 = repaint_main2;        
    }
    window.ClearTimeout(a000001);
},500);

function on_library_items_added(){
    get_library(1);
            get_pl_tree();            
            repaint_f1 = repaint_f2;
            repaint_main1 = repaint_main2;
    }
function on_library_items_removed(){
    get_library(1);
            get_pl_tree();            
            repaint_f1 = repaint_f2;
            repaint_main1 = repaint_main2;
    }
seriousstas вне форума   Ответить с цитированием
Старый 23.06.2016, 19:02   #1894
duzzy
Гуру
 
Регистрация: 01.06.2013
Регион: 78, 98
Машина: SUBARU Impreza WRX
Сообщений: 1,766
duzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond repute
По умолчанию

seriousstas
Там в скрипте заморочка с индексами при отправке в плейлист... отсюда и трабл... как это править не понятно...

Скрипт WilB-а посмотри плиз, как он отправляет правильно или тоже с косяками...
duzzy вне форума   Ответить с цитированием
Старый 23.06.2016, 19:17   #1895
seriousstas
Бывалый писикарщик
 
Регистрация: 14.06.2013
Регион: Украина
Машина: Nissan Qashqai+2
Сообщений: 3,424
seriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant future
По умолчанию

Цитата:
Сообщение от duzzy Посмотреть сообщение
seriousstas
Там в скрипте заморочка с индексами при отправке в плейлист... отсюда и трабл... как это править не понятно...

Скрипт WilB-а посмотри плиз, как он отправляет правильно или тоже с косяками...
Отправляет хорошо, но :
Цитата:
WSH Panel Mod (Library Tree v0.8 by Wilb): Ошибка выполнения Microsoft JScript:
Объект не поддерживает это свойство или метод
File: <main>
Line: 2673, Col: 2
<source text only available at compile time>
И не фильтрует основной файл . Висит знак вопроса и внутри
главный файл для CUE
_________________________________
PS выяснил, что ошибка из-за параллельно установленного WSH 1.5.10
c WSH 1.6 - JS дружит , но foo_cuefilter не работает ..
seriousstas вне форума   Ответить с цитированием
Старый 23.06.2016, 19:35   #1896
duzzy
Гуру
 
Регистрация: 01.06.2013
Регион: 78, 98
Машина: SUBARU Impreza WRX
Сообщений: 1,766
duzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond repute
По умолчанию

kaamoss
Цитата:
Я ни хрена не понимаю в этих скриптах и в этих панелях))))
Для меня лично лишь бы всё правильно работало и трэки правильно распологались)))

пс Мой делитантский ответ
Вникать придется потому как почти все панели скриптовые, и так как это не домашняя сборка то всегда есть свои нюансы...

можешь глянуть видосы
- по настройкам и т.д.(настройки показаны не все, но их большая часть)

- добавление новой панели в сборку

скрипты и некоторые ответы на твои вопросы ты сможешь найти в "Готовых сборках"... ссылка в подписи.
duzzy вне форума   Ответить с цитированием
Старый 23.06.2016, 19:39   #1897
duzzy
Гуру
 
Регистрация: 01.06.2013
Регион: 78, 98
Машина: SUBARU Impreza WRX
Сообщений: 1,766
duzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond repute
По умолчанию

seriousstas

Цитата:
WSH Panel Mod (Library Tree v0.8 by Wilb): Ошибка выполнения Microsoft JScript:
Этот скрипт Library Tree v0.8 by Wilb для JScript Panel

необходимо для старта...
Код:
REQUIREMENT

JScript Panel 1.1.0+
duzzy вне форума   Ответить с цитированием
Старый 23.06.2016, 19:41   #1898
seriousstas
Бывалый писикарщик
 
Регистрация: 14.06.2013
Регион: Украина
Машина: Nissan Qashqai+2
Сообщений: 3,424
seriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant future
По умолчанию

Цитата:
Этот скрипт Library Tree v0.8 by Wilb для JScript Panel
Это я понял - он-бы вообще на WSH не запустился Причина - выше :
http://pccar.ru/showpost.php?p=363301&postcount=1895
поставь рядом WSH 1.5.10 и вылезет ..
с 1.6.0 - норм
seriousstas вне форума   Ответить с цитированием
Старый 23.06.2016, 19:47   #1899
duzzy
Гуру
 
Регистрация: 01.06.2013
Регион: 78, 98
Машина: SUBARU Impreza WRX
Сообщений: 1,766
duzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond repute
По умолчанию

seriousstas
ага понял конфликтует с 1.5.10...
Цитата:
но foo_cuefilter не работает
и скорее всего не будет, потому как идет прямое обращение в индекс(библиотеку) фубара... т.е. показывает все как есть в папке, но при добавление в плейлист идет разбивка на треки.

------------------
Т.е. в этом варианте не используется прослойка в виде плейлиста как у вьетнамского товарища...
схема такая

библиотека ---> плейлист ---> скрипт (вьетнамский скипт)

библиотека ---> скрипт (скрипт WilB)
duzzy вне форума   Ответить с цитированием
Старый 23.06.2016, 19:52   #1900
seriousstas
Бывалый писикарщик
 
Регистрация: 14.06.2013
Регион: Украина
Машина: Nissan Qashqai+2
Сообщений: 3,424
seriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant futureseriousstas has a brilliant future
По умолчанию

Цитата:
Сообщение от duzzy Посмотреть сообщение
seriousstas
ага понял конфликтует с 1.5.10...

и скорее всего не будет, потому как идет прямое обращение в индекс(библиотеку) фубара... т.е. показывает все как есть в папке, но при добавление в плейлист идет разбивка на треки.
Ясно , думаю мож немного подковырять старую version "1.0" :
http://pccar.ru/showpost.php?p=363298&postcount=1893
С ней ведь никаких проблем вообще ..
Ну зачем нам знаки вопроса и лишние файлы в "дереве" ?
seriousstas вне форума   Ответить с цитированием
Ответ


Здесь присутствуют: 11 (пользователей: 0 , гостей: 11)
 

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.



Часовой пояс GMT +4, время: 13:37.


Работает на vBulletin® версия 3.8.4.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot