Именно !про новую бету плеера
JS панель наоборот радует своей скоростью работы и расширенным функционалом ..
А где почитать про изменения по TF в бетке ?что-то в новой версии не то)
Список разделов › foobar2000 › Секреты foobar2000
Именно !про новую бету плеера
А где почитать про изменения по TF в бетке ?что-то в новой версии не то)
А зачем менять то, что и так хорошо работает на то, что может когда нибудь заработает?AHAPXICT:Так что если всё будет работать как полагается, то менять однозначно!
Пропали .. Не знаю что делать с Вашим скриптом поиска . Посмотрите на предмет совместимости с v1.4 ?kgena_ua:Что по био, пропали фризы. Если да, то у мня есть обновление. На гидрогене у пользователя были проблемы...
// ==PREPROCESSOR==
// @name "SEARCH PANEL"
// ==/PREPROCESSOR==
//------------------------------------------SEARCH PANEL
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));
}
DT_CENTER = 0x00000001;
DT_RIGHT = 0x00000002;
DT_SINGLELINE = 0x00000020;
DT_VCENTER = 0x00000004;
//===load background image===//
var wallpaper_image = window.GetProperty("*_Wallpaper image", ".\\wsh_br3tt\\jsplaylist\\images\\default.jpg");
var Path = fb.FoobarPath;
var g_image = gdi.Image(Path + "\\" + wallpaper_image);
var wallpaper_show = window.GetProperty("*_Wallpaper Show ON|OFF", true);
var wallpaper_alpha = window.GetProperty("*_Wallpaper Alpha", 150);
var font_name = window.GetProperty("_Font Name", "Segoe UI Semibold");
var font_size = window.GetProperty("_Font Size", 35);
var font_style = window.GetProperty("_Font Style", 0);
var font_choice_name = window.GetProperty("_Font Category Name", "Segoe UI");
var font_choice_size = window.GetProperty("_Font Category Size", 25);
var font_choice_style = window.GetProperty("_Font Category Style", 1);
var font = gdi.Font(font_name, font_size, font_style);
var font2 = gdi.Font(font_choice_name, font_choice_size, font_choice_style);
var font_item = gdi.Font("Segoe UI Symbol", font_size, 0);
var lbdn = false;
var lbup = false;
var qwerty = window.GetProperty("*_Keyboard Layout(qwerty)", true);
var item_show = window.GetProperty("*_Item Show", true);
var t_color = window.GetProperty("_Text Color", "RGB(220,20,60)");
var m_color = window.GetProperty("_Text Сategory Сhoice Color", "RGB(120,120,120)");
var sel_color = window.GetProperty("_Text Select Color", "RGB(250,250,250)");
var sel_bg_act_color = window.GetProperty("_Button Active Rect Color", "RGB(0,170,255)");
var sel_bg_color = window.GetProperty("_Button Active Color", "RGB(100,100,100)");
var btn_main_color = window.GetProperty("_Button Gradient Main Color", "RGBA(47,48,53,250)");
var btn_sec_color = window.GetProperty("_Button Gradient Sec Color", "RGBA(10,10,20,50)");
var item_color = window.GetProperty("*_Item Color", "RGB(160,160,170)");
var background_color = window.GetProperty("*_Background Color", "RGB(15,15,15)");
var btn_round_rect_color = window.GetProperty("_Button RoundRect Color", "RGBA(0,0,0,250)");
var overlay_color = window.GetProperty("*_Wallpaper Overlay Color", "RGBA(0,0,0,180)");
var overlay_color_on = window.GetProperty("*_Wallpaper Overlay Color ON|OFF", false);
var g_t_color = 0,
g_m_color = 0,
g_sel_color = 0,
g_sel_bg_act_color = 0,
g_sel_bg_color = 0,
g_btn_main_color = 0,
g_btn_sec_color = 0,
g_item_color = 0,
g_background_color = 0,
g_btn_round_rect_color = 0,
g_overlay_color = 0;
function get_colors() {
if (t_color.length > 0) g_t_color = eval(t_color);
if (m_color.length > 0) g_m_color = eval(m_color);
if (sel_color.length > 0) g_sel_color = eval(sel_color);
if (sel_bg_act_color.length > 0) g_sel_bg_act_color = eval(sel_bg_act_color);
if (sel_bg_color.length > 0) g_sel_bg_color = eval(sel_bg_color);
if (btn_main_color.length > 0) g_btn_main_color = eval(btn_main_color);
if (btn_sec_color.length > 0) g_btn_sec_color = eval(btn_sec_color);
if (item_color.length > 0) g_item_color = eval(item_color);
if (background_color.length > 0) g_background_color = eval(background_color);
if (btn_round_rect_color.length > 0) g_btn_round_rect_color = eval(btn_round_rect_color);
if (overlay_color.length > 0) g_overlay_color = eval(overlay_color);
};
function on_colors_changed() {
get_colors();
CollectGarbage();
window.Repaint();
};
get_colors();
var t_row = -8,
t_row1, t_row2, t_row3, t_row4, t_height, rect_w;
var string = "",
search_query;
var tag_search = window.GetProperty("tag_search", 1);
var previous_pll = plman.ActivePlaylist;
var sort = "%album artist%|%date%|%album%|%discnumber%|%tracknumber%|%title%";
var on_mouse = false;
var ab, ab1, ab2, ab3;
var ab_I, ab_C, ab_F, ab_M;
var it, it1, it2, it3, itM;
var line1 = false,
line2 = false,
line3 = false,
line4 = false;
var lang = 1;
var count = 0;
function on_size() {
if (!window.Width || !window.Height) {
return;
};
ww = window.Width;
wh = window.Height;
}
function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, g_background_color); //---bg
if (wallpaper_show) {
try {
gr.DrawImage(g_image, 0, 0, ww, wh, 0, 0, g_image.width, g_image.height, 0, wallpaper_alpha);
if (overlay_color_on) gr.FillSolidRect(0, 0, ww, wh, g_overlay_color); //--- overlay fillrect
} catch (e) {};
} else {};
t_height = gr.CalcTextheight("abc", font);
t_row1 = t_row + t_height - 4;
t_row2 = t_row1 + t_height + 1;
t_row3 = t_row2 + t_height + 1;
t_row4 = t_row3 + t_height + 1;
if (qwerty) {
ab_I = Array("Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Z", "X", "C", "V", "B", "N", "M", " ", "", ""); //last to sym del and clear
ab_C = Array("Й", "Ц", "У", "К", "Е", "Ё", "Н", "Г", "Ш", "Щ", "З", "Х", "Ъ", "Ф", "Ы", "В", "А", "П", "Р", "О", "Л", "Д", "Ж", "Э", "Я", "Ч", "С", "М", "И", "Т", "Ь", "Б", "Ю", " ", "", "");
} else {
ab_I = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "", "");
ab_C = Array("А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "Р", "С", "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ы", "Ь", "Э", "Ю", "Я", " ", "", "");
};
ab_F = Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "/", "'", "#", ".", ",", "-", ":", "&", " ", "", "")
ab_M = Array("all", "artist", "album", "title", "genre", "date", "rating");
if (lang == 1) ab_M = ab_M.concat("Ru", "09");
if (lang == 2) ab_M = ab_M.concat("En", "09");
if (lang == 3) ab_M = ab_M.concat("En", "Ru");
itM = ab_M.length;
if (lang == 1) ab = ab_I;
if (lang == 2) ab = ab_C;
if (lang == 3) ab = ab_F;
it = ab.length;
it1 = Math.round(it / 3);
it2 = Math.round(it / 3);
it3 = Math.round(it / 3);
ab1 = ab.splice(0, it1);
ab2 = ab.splice(0, it2);
ab3 = ab.splice(0, it3);
gr.FillGradRect(0, 0, ww, t_height - 13, 90, g_btn_sec_color, g_btn_main_color); //---top rect
gr.SetSmoothingMode(4);
gr.DrawRoundRect(0, 0, ww - 1, t_height - 13, 3, 3, 1.0, g_btn_round_rect_color); //---round rect
gr.SetSmoothingMode(0);
gr.SetSmoothingMode(4);
if (on_mouse && line1) gr.FillSolidRect(x_col1, t_row1, ww / it1, t_height, g_sel_bg_color);
if (on_mouse && line2) gr.FillSolidRect(x_col2, t_row2, ww / it2, t_height, g_sel_bg_color);
if (on_mouse && line3) gr.FillSolidRect(x_col3, t_row3, ww / it3, t_height, g_sel_bg_color); //
if (on_mouse && line4) gr.FillSolidRect(x_col4, t_row4, ww / itM, t_height - 4, g_sel_bg_color);
gr.GdiDrawText(string, font, search ? g_sel_color : g_t_color, 10, t_row, ww, t_height, DT_SINGLELINE | DT_VCENTER | 0x00000800);
for (var i = 0; i < it1; i = i + 1) {
color = x_color > ww / it1 * i && x_color < ww / it1 * (i + 1) && on_mouse && line1 ? g_sel_color : g_t_color;
gr.FillGradRect(ww / it1 * i, t_row1, ww / it1 - 1, t_height, 90, g_btn_sec_color, g_btn_main_color); //butt emul
gr.DrawRoundRect(ww / it1 * i, t_row1, ww / it1 - 1, t_height, 3, 3, 1.0, g_btn_round_rect_color); //---round rect keyboard
gr.GdiDrawText(ab1[i] == " " ? "˻ ˼" : ab1[i], font, color, ww / it1 * i, t_row1, ww / it1, t_height, DT_CENTER | DT_SINGLELINE | DT_VCENTER | 0x00000800);
}
for (var i = 0; i < it2; i = i + 1) {
color = x_color > ww / it2 * i && x_color < ww / it2 * (i + 1) && on_mouse && line2 ? g_sel_color : g_t_color;
gr.FillGradRect(ww / it2 * i, t_row2, ww / it2 - 1, t_height, 90, g_btn_sec_color, g_btn_main_color); //butt emul
gr.DrawRoundRect(ww / it2 * i, t_row2, ww / it2 - 1, t_height, 3, 3, 1.0, g_btn_round_rect_color); //---round rect keyboard
gr.GdiDrawText(ab2[i] == " " ? "˻ ˼" : ab2[i], font, color, ww / it2 * i, t_row2, ww / it2, t_height, DT_CENTER | DT_SINGLELINE | DT_VCENTER | 0x00000800);
}
for (var i = 0; i < it3; i = i + 1) {
color = x_color > ww / it3 * i && x_color < ww / it3 * (i + 1) && on_mouse && line3 ? g_sel_color : g_t_color;
gr.FillGradRect(ww / it3 * i, t_row3, ww / it3 - 1, t_height, 90, g_btn_sec_color, g_btn_main_color); //butt emul
gr.DrawRoundRect(ww / it3 * i, t_row3, ww / it3 - 1, t_height, 3, 3, 1.0, g_btn_round_rect_color); //---round rect keyboard
gr.GdiDrawText(ab3[i] == " " ? "˻ ˼" : ab3[i], font, color, ww / it3 * i, t_row3, ww / it3, t_height, DT_CENTER | DT_SINGLELINE | DT_VCENTER | 0x00000800);
}
for (var i = 0; i < itM; i = i + 1) {
color = (x_color > ww / itM * i && x_color < ww / itM * (i + 1) && on_mouse && line4) || tag_search == i + 1 ? g_sel_color : g_m_color;
gr.FillGradRect(ww / itM * i, t_row4, ww / itM - 1, t_height - 4, 90, g_btn_sec_color, g_btn_main_color); //butt emul
gr.DrawRoundRect(ww / itM * i, t_row4, ww / itM - 1, t_height - 4, 3, 3, 1.0, g_btn_round_rect_color); //---round rect keyboard
gr.GdiDrawText(ab_M[i], font2, color, ww / itM * i, t_row4, ww / itM, t_height, DT_CENTER | DT_SINGLELINE | DT_VCENTER | 0x00000800);
}
if (on_mouse && line1) gr.DrawRoundRect(x_col1, t_row1, ww / it1 - 1, t_height, 3, 3, 1.0, g_sel_bg_act_color);
if (on_mouse && line2) gr.DrawRoundRect(x_col2, t_row2, ww / it2 - 1, t_height, 3, 3, 1.0, g_sel_bg_act_color);
if (on_mouse && line3) gr.DrawRoundRect(x_col3, t_row3, ww / it3 - 1, t_height, 3, 3, 1.0, g_sel_bg_act_color);
if (on_mouse && line4) gr.DrawRoundRect(x_col4, t_row4, ww / itM - 1, t_height - 4, 3, 3, 1.0, g_sel_bg_act_color);
if (item_show) {
if (count <= 0) {} else {
gr.GdiDrawText("♪ " + count, font_item, g_item_color, 0, t_row, ww - 10, t_height, DT_RIGHT | DT_SINGLELINE | DT_VCENTER | 0x00000800);
};
};
gr.SetSmoothingMode(0);
};
var timer;
var f = 0;
function on_mouse_lbtn_down(x, y) {
lbdn = true;
lbup = false;
on_mouse = true;
window.ClearInterval(timer);
timer = window.SetInterval(function() {
f = f + 1;
window.Repaint();
if (lbup || f == 3) {
window.ClearInterval(timer);
}
}, 200);
}
var ch;
var x_col1, x_col2, x_col3, x_col4;
var x_color;
function on_mouse_lbtn_up(x, y) {
lbup = true;
line1 = y >= t_row1 && y <= t_row1 + t_height ? true : false;
line2 = y >= t_row2 && y <= t_row2 + t_height ? true : false;
line3 = y >= t_row3 && y <= t_row3 + t_height ? true : false;
line4 = y >= t_row4 && y <= t_row4 + t_height ? true : false;
if (!line1 && !line2 && !line3 && !line4) return;
if (!search) previous_pll = plman.ActivePlaylist;
library_view_idx();
for (var i = 0; i < it1; i = i + 1) {
if (x > ww / it1 * i && x < ww / it1 * (i + 1) && line1) {
ch = ab1[i]
}
}
for (var i = 0; i < it2; i = i + 1) {
if (x > ww / it2 * i && x < ww / it2 * (i + 1) && line2) {
ch = ab2[i]
}
}
//
for (var i = 0; i < it3; i = i + 1) {
if (x > ww / it3 * i && x < ww / it3 * (i + 1) && line3) {
ch = ab3[i]
}
}
//
for (var i = 0; i < itM; i = i + 1) {
if (x > ww / itM * i && x < ww / itM * (i + 1) && line4) {
if (i < itM - 2) {
tag_search = i + 1;
tag_search_change();
return;
} else {
ch = ab_M[i]
}
}
}
if (ch == "En") {
ch = "";
lang = 1;
return
};
if (ch == "Ru") {
ch = "";
lang = 2;
return
};
if (ch == "09") {
ch = "";
lang = 3;
return
};
if (ch == "") { //del sym
ch = "";
string = string.substring(0, string.length - 1)
};
if (ch == "") { //clear sym
ch = "";
string = ""
};
if (ch == null) {
ch = "";
string = ""
};
string = string + ch;
string = string.charAt(0) == " " ? "" : string;
string = string.replace(" ", " ");
if (string.length > 0 || search) pll_search();
window.ClearInterval(timer);
window.Repaint();
}
var search = false;
var count;
function pll_search() {
remove_pll("search");
switch (tag_search) {
case 1:
search_query = "%artist% HAS " + string + " OR " + "%album% HAS " + string + " OR " + "%title% HAS " + string + " OR " + "%genre% HAS " + string + " OR " + "%date% HAS " + string;
break;
case 2:
search_query = "%artist% HAS " + string;
break;
case 3:
search_query = "%album% HAS " + string;
break;
case 4:
search_query = "%title% HAS " + string;
break;
case 5:
search_query = "%genre% HAS " + string;
break;
case 6:
search_query = "%date% HAS " + string;
break;
case 7:
search_query = "rating HAS " + string.charAt(0) + " OR " + "%rating% HAS " + string.charAt(0) + " OR " + "rating HAS " + string.charAt(1) + " OR " + "%rating% HAS " + string.charAt(1) + " OR " + "rating HAS " + string.charAt(2) + " OR " + "%rating% HAS " + string.charAt(2) + " OR " + "rating HAS " + string.charAt(3) + " OR " + "%rating% HAS " + string.charAt(3) + " OR " + "rating HAS " + string.charAt(4) + " OR " + "%rating% HAS " + string.charAt(4);
break;
}
idx = plman.PlaylistCount;
plman.CreateAutoPlaylist(idx, "search", search_query, sort, 0);
count = plman.PlaylistItemCount(idx)
if (count > 0) {
plman.ActivePlaylist = idx;
search = true
} else {
plman.ActivePlaylist = lib_v_idx;
remove_pll("search");
search = false;
}
}
function remove_pll(pll_name) {
search = false;
remove_idx = plman.PlaylistCount;
for (var i = 0; i < remove_idx; i++) {
if (plman.GetPlaylistName(i) == pll_name) {
plman.RemovePlaylist(i)
}
}
}
var lib_v_idx;
function library_view_idx() {
idx = plman.PlaylistCount;
for (var i = 0; i < idx; i++) {
if (plman.GetPlaylistName(i) == "Library view") {
lib_v_idx = i
}
}
}
function on_playback_starting(cmd, is_paused) {
string = "";
search = false;
if (plman.GetPlaylistName(plman.ActivePlaylist) != "search") {
remove_pll("search");
}
}
function on_mouse_move(x, y) {
if (lbdn) on_mouse = true;
line1 = y >= t_row1 && y <= t_row1 + t_height ? true : false;
line2 = y >= t_row2 && y <= t_row2 + t_height ? true : false;
line3 = y >= t_row3 && y <= t_row3 + t_height ? true : false;
line4 = y >= t_row4 && y <= t_row4 + t_height ? true : false;
x_color = x;
for (var i = 0; i < it1; i = i + 1) {
if (x > ww / it1 * i) {
x_col1 = ww / it1 * i
}
}
for (var i = 0; i < it2; i = i + 1) {
if (x > ww / it2 * i) {
x_col2 = ww / it2 * i
}
}
for (var i = 0; i < it3; i = i + 1) {
if (x > ww / it3 * i) {
x_col3 = ww / it3 * i
}
}
for (var i = 0; i < itM; i = i + 1) {
if (x > ww / itM * i) {
x_col4 = ww / itM * i
}
}
}
function on_mouse_leave() {
window.ClearInterval(timer);
on_mouse = false;
lbdn = false;
lbup = false;
window.Repaint();
CollectGarbage();
}
function on_mouse_rbtn_up(x, y) {
var _menu = window.CreatePopupMenu();
var i = 1;
_menu.AppendMenuItem(0x00000000, i++, "all");
_menu.AppendMenuItem(0x00000000, i++, "artist");
_menu.AppendMenuItem(0x00000000, i++, "album");
_menu.AppendMenuItem(0x00000000, i++, "title");
_menu.AppendMenuItem(0x00000000, i++, "genre");
_menu.AppendMenuItem(0x00000000, i++, "date");
_menu.AppendMenuItem(0x00000000, i++, "rating");
_menu.CheckMenuRadioItem(1, i, tag_search);
_menu.EnableMenuItem(tag_search, 1);
_menu.AppendMenuItem(0x00000800, 0, 0);
_menu.AppendMenuItem(0x00000000, 11, "Keyboard Layout(qwerty)");
_menu.AppendMenuItem(0x00000000, 8, "Wallpaper Show ON|OFF");
_menu.AppendMenuItem(0x00000000, 9, "Properties ...");
_menu.AppendMenuItem(0x00000000, 10, "Configure ...");
_menu.CheckMenuItem(8, wallpaper_show);
_menu.CheckMenuItem(11, qwerty);
ret = _menu.TrackPopupMenu(x, y);
if (ret == 0) return;
switch (ret) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
tag_search = 7;
tag_search_change();
break;
case 8:
wallpaper_show = !wallpaper_show;
window.SetProperty("*_Wallpaper Show ON|OFF", wallpaper_show);
break;
case 9:
window.ShowProperties();
break;
case 10:
window.ShowConfigure();
break;
case 11:
qwerty = !qwerty
window.SetProperty("*_Keyboard Layout(qwerty)", qwerty);
break;
}
_menu.Dispose();
return true;
}
function tag_search_change() {
window.SetProperty("tag_search", tag_search);
if (string.length > 0) pll_search();
}
function on_playback_pause() {
window.Repaint();
};
function on_playback_stop() {
window.Repaint();
};
function on_playback_starting() {
window.Repaint();
};
"Get Covers (Artwork) radio logos"
version "24032018"
if (images.length < limit) get_img_from_dir(artist_folder_path(meta_artist), meta_artist);
if (images.length < limit) get_img_from_dir(artist_folder_path(clean(meta_artist)), meta_artist);
запрещает выполнение данного пункта меню и его затенение._menu.EnableMenuItem(set_priority + 20, 1);
После закомментирования всех таких строк, скрипт выполняется нормально, но конкретный пункт меню не затеняется и разрешено его выполнение.Error: JScript Panel v2.1.0.2 (Get Covers (Artwork) radio logos v24032018 by kgena_ua)
JavaScript runtime error:
Object doesn't support property or method 'EnableMenuItem'
File: <main>
Line: 1002, Col: 2
<source text only available at compile time>
Если вы запускаете скрипт на JScript Panel v2.1.0.2, то и смотрите документацию к этой панели(есть непосредственно в папке с компонентом или на оффpois22ple:Я смотрел документацию по foo_uie_wsh_panel_mod и не нашел там описание вызова EnableMenuItem.
v2.0.3
The IMenuObj EnableMenuItem method has been removed. Consider using flags like MF_GRAYED/MF_DISABLED on AppendMenuItem instead. Also, the optional bypos arguments for CheckMenuItem and CheckMenuRadioItem have both been removed. See the updated interfaces.txt for full details.
pois22ple, Аналог не получится.pois22ple:Если бы понял, то попытался бы слепить ему аналог для JScript Panel.
Вернуться в Секреты foobar2000