А что там в консоли....Check the console
А лучше было-бы посмотреть саму сборку, так проще и быстрее. Заархивируйте свою сборку, положите на какой-нибудь файлообменник и дайте ссылку.
Список разделов › foobar2000 › Секреты foobar2000
А что там в консоли....Check the console
Если у Вас нет скрипта от marc2003 могу выложить. У меня есть сборка от vladj , где есть этот скрипт.Error: WSH Panel Mod (Now Playing by marc2003): Анализ файла "E:\foobar2000\marc2003\common8.js": Failed to load
Показ обложек с помощью плагина foo_chronflow.dll, на винде 8 требует всегда установить и старый, 9 дайрект икс.kgena_ua:это что, что за библиотека
то нет проблем, в понедельник посмотрим.egen17:egen17 » Сегодня, 09:15
https://cloud.mail.ru/public/E9zw/HiPCrmSem
но дело в том, что в сборке, по вышеуказанной ссылке, нет этого скрипта.egen17:При запуске всплывает такое окно:
Панель WSH (модуль)
Scripting Engine Initialization Failed (WSH Timer & Alarm clock & Clock by kgena_ua, CODE: 0x80020101)
Check the console for more information (Always caused by unexcepted script error).
MC Web, все замечательно работает на XP.MC Web:MC Web » 07.11.2015, 18:11
function on_paint(gr) {
star(gr, 100, 100, 140, 0, 4, RGB(255,255,220), 255);
}
function star(gr, x, y, img_size, fill, line_thickness, color, copacity){
var radius = img_size / 2;
var radius_2 = radius / 2.61803;
line_thickness = line_thickness >= radius_2 ? radius_2 : line_thickness;
var delta = line_thickness / 2 * Math.tan(72 / 180 * Math.PI);
var points = [],
x_points_1 = [], y_points_1 = [];
x_points_2 = [], y_points_2 = [];
for (var i = 0; i < 10; i++) {
if (i % 2 == 0) {
x_points_1.push((radius - delta) * Math.cos(Math.PI * i / 10 * 2 - Math.PI / 2));
y_points_1.push((radius - delta) * Math.sin(Math.PI * i / 10 * 2 - Math.PI / 2));
} else {
x_points_2.push((radius - delta) / 2.61803 * Math.cos(Math.PI * i / 10 * 2 - Math.PI / 2));
y_points_2.push((radius - delta) / 2.61803 * Math.sin(Math.PI * i / 10 * 2 - Math.PI / 2));
}
}
for (var i = 0; i < 5; i++) {
points.push(x_points_1[i] + radius, y_points_1[i] + radius, x_points_2[i] + radius, y_points_2[i] + radius);
}
var img = gdi.CreateImage(img_size, img_size);
var temp_gr = img.GetGraphics();
temp_gr.SetSmoothingMode(2);
if(fill > 0) {
temp_gr.FillPolygon(color, 1, points)
}
if(line_thickness > 0) {
temp_gr.DrawPolygon(color, line_thickness, points);
}
gr.DrawImage(img, x - radius, y - radius, img_size, img_size, 0, 0, img_size, img_size, 0, copacity);
img.ReleaseGraphics(temp_gr);
img.Dispose();
temp_gr = null;
img = null;
}
// ==PREPROCESSOR==
// @name "Rating & file attributes"
// @author "kgena_ua"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==
// foo_playcount.dll required
function RGB(r,g,b) { return (0xff000000|(r<<16)|(g<<8)|(b)); }
var font = gdi.Font("Arial",9,0);
var font_2 = gdi.Font("Arial",12,1);
var ww,wh;
DT_LEFT = 0x00000000;
var bgcolor = RGB(0,0,0);
var no_rating_color = RGB(100,100,100);
var rating_color = RGB(255,255,200);
var red_color = RGB(255,100,0);
var Tooltip = window.CreateTooltip();
var posx, posy;
var col = 20;
var row = 10;
var g_drag = false;
var on_mouse = false;
var rating = 0, TAGrating, DBrating, nrating = 0;
var rating_m = window.GetProperty("def_rating_m", 0);
var rating_5 = window.GetProperty("rating_5", 2);;
var fso = new ActiveXObject("Scripting.FileSystemObject");
var file, file_path = "", file_ext = "";
var file_attributes, readwrite;
var read_only = false, cue_file = false, stream = false;
var star_size = 15, offset = star_size + 3;
var metadb;
var count;
on_item_focus_change();
function on_paint(gr){
!window.IsTransparent && gr.FillSolidRect(0, 0, ww, wh, bgcolor);
for (var i = 0; i < (5 * offset); i = i + offset) {
draw_star(gr, col + i + star_size / 2, row + star_size / 2, star_size, 1, 0, no_rating_color);
}
for (var i = 0; i < ((g_drag ? nrating : rating) * offset); i = i + offset) {
color = readwrite ? rating_color : red_color;
draw_star(gr, col + i + star_size / 2, row + star_size / 2, star_size, 1, 0, color);
}
gr.GdiDrawText(rating_m == 0 ? "db" : "tag" , font, on_mouse ? rating_color : no_rating_color, 0, row, ww, row + star_size, DT_LEFT);
gr.GdiDrawText("", font_2, RGB(255,255,200), 1, 10, ww, wh);
}
function getNRating() {
nrating = Math.ceil(( posx - col ) / offset );
if (nrating > 5) nrating = 5;
if (nrating < 0) nrating = 0;
if (nrating != 0) nrating = rating_5 == 1 ? 5 : nrating;
}
function getRating(){
if ( count > 1 ) {
TAGrating = 0;
DBrating = 0;
for (var i = 0; i < count; i++) {
item = plman.GetPlaylistSelectedItems(plman.ActivePlaylist).Item(i);
DBrating += parseInt(fb.TitleFormat("$if2(%rating%,0)").EvalWithMetadb(item));
TAGrating += parseInt(fb.TitleFormat("$if2($meta(rating),0)").EvalWithMetadb(item));
}
rating = rating_m == 0 ? DBrating : TAGrating;
rating = rating / count;
} else {
DBrating = fb.TitleFormat("$if2(%rating%,0)").EvalWithMetadb(metadb);
TAGrating = fb.TitleFormat("$if2($meta(rating),0)").EvalWithMetadb(metadb);
rating = rating_m == 0 ? DBrating : TAGrating;
}
}
function setRating(){
if ((nrating != rating) && metadb) {
if (rating_m == 0) {
if ( count > 1 ) {
for (var i = 0; i < count; i++) {
item = plman.GetPlaylistSelectedItems(plman.ActivePlaylist).Item(i);
fb.RunContextCommandWithMetadb("Playback Statistics/Rating/" + (nrating == 0 ? "<not set>" : nrating), item);
}
} else{
fb.RunContextCommandWithMetadb("Playback Statistics/Rating/" + (nrating == 0 ? "<not set>" : nrating), metadb);
}
rating = nrating;
} else {
if ( count > 1 ) {
for (var i = 0; i < count; i++) {
item = plman.GetPlaylistSelectedItems(plman.ActivePlaylist).Item(i);
if (readwrite) {item.UpdateFileInfoSimple("Rating", nrating == 0 ? "" : nrating);
rating = nrating
}
}
} else{
if (readwrite) {metadb.UpdateFileInfoSimple("Rating", nrating == 0 ? "" : nrating);
rating = nrating
}
}
}
}
g_drag = false;
if (rating_m == 1) {
Tooltip.Activate();
Tooltipdelay()
}
}
function on_mouse_lbtn_up(x,y){
setRating();
}
function on_mouse_mbtn_dblclk(){
nrating = 0;
setRating();
}
function on_mouse_lbtn_down(x,y) {
g_drag = true;
posx = x;
getNRating();
window.Repaint();
}
function on_mouse_move(x, y) {
on_mouse = true;
window.SetCursor(32649);
if (g_drag){
posx = x ;
getNRating();
}
window.Repaint();
}
function on_mouse_leave() {
on_mouse = false;
window.SetCursor(32512);
window.Repaint();
}
function on_mouse_wheel(delta) {
if (delta > 0) {rating_m = 0};
if (delta < 0) {rating_m = 1};
window.SetProperty("def_rating_m", rating_m);
on_item_focus_change();
window.Repaint();
}
function on_mouse_rbtn_up (x, y){
var _menu = window.CreatePopupMenu();
var i = 1;
_menu.AppendMenuItem(0x00000000, i++, "Store Ratings in the database");
_menu.AppendMenuItem(0x00000000, i++, "Store Ratings in the file tags");
_menu.CheckMenuRadioItem(1, i, rating_m + 1);
_menu.EnableMenuItem(rating_m + 1, 1);
_menu.AppendMenuItem(0x00000800, 0, 0);
_menu.AppendMenuItem(0x00000000, i++, "Set Rating 5");
_menu.CheckMenuItem(i-1, rating_5 - 2);
var txt = "";
switch (file_attributes) {
case 32:
txt = "read - only";
break;
case 33:
txt = "read - write";
break;
}
if ( txt != "") {
_menu.AppendMenuItem(0x00000800, 0, 0);
_menu.AppendMenuItem(0x00000000, i++, "change file" + (count > 1 ? "s" : "") + " to " + txt);
}
ShiftDown = utils.IsKeyPressed(0x10) ? true : false;
// if (ShiftDown) {
_menu.AppendMenuItem(0x00000800, 0, 0);
_menu.AppendMenuItem(0x00000000, 20, "Properties");
_menu.AppendMenuItem(0x00000000, 30, "Configure...");
// }
ret = _menu.TrackPopupMenu(x, y);
if (ret == 0) return;
switch (ret) {
case 1:
rating_m = 0;
window.SetProperty("def_rating_m", rating_m);
on_item_focus_change();
break;
case 2:
rating_m = 1;
window.SetProperty("def_rating_m", rating_m);
on_item_focus_change();
break;
case 3:
rating_5 = rating_5 == 1 ? 2 : 1;
window.SetProperty("rating_5", rating_5);
break;
case 4:
switch (file_attributes) {
case 32:
if (metadb) change_file_attributes(33); //read only
on_item_focus_change();
break;
case 33:
if (metadb) change_file_attributes(32); //read write
on_item_focus_change();
break;
}
break;
case 20:
window.ShowProperties();
break;
case 30:
window.ShowConfigure();
break;
}
_menu.Dispose();
return true;
}
function get_attributes() {
file_attributes = 0;
for (var i = 0; i < count; i++) {
item = plman.GetPlaylistSelectedItems(plman.ActivePlaylist).Item(i);
file_path = fb.Titleformat("%path%").EvalWithMetadb(item);
file_ext = fb.Titleformat("$ext([%filename_ext%])").EvalWithMetadb(item);
try {
file = fso.GetFile(file_path);
file_attributes += parseInt(file.Attributes);
} catch(e) {};
}
file_attributes = Math.round(file_attributes / count);
read_only = file_attributes == 33 ? true : false;
cue_file = file_ext == 'cue' ? true : false;
stream = file_path.indexOf('://') > 0 ? true : false;
Tooltip.Text = read_only ? " file" + (count > 1 ? "s are " : " is ") + "read only " : cue_file ? " cue file " : stream ? " stream " : "";
if ((file_attributes == 33 || file_ext == 'cue' || file_path.indexOf('://') > 0) && rating_m == 1 ) {
readwrite = false;
} else {
readwrite = true;
}
}
function change_file_attributes(k) {
for (var i = 0; i < count; i++) {
item = plman.GetPlaylistSelectedItems(plman.ActivePlaylist).Item(i);
file_path = fb.Titleformat("%path%").EvalWithMetadb(item);
try {
file = fso.GetFile(file_path);
file.Attributes = k;
} catch(e) {};
}
}
function on_playlist_switch() {
on_item_focus_change();
}
function on_playback_new_track() {
on_item_focus_change();
}
function on_playback_stop() {
on_item_focus_change();
}
function on_selection_changed(metadb) {
on_item_focus_change();
}
function on_item_focus_change() {
metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
if (metadb) on_metadb_changed();
}
function on_metadb_changed() {
count = plman.GetPlaylistSelectedItems(plman.ActivePlaylist).Count;
if (metadb) {
rating_m = window.GetProperty("def_rating_m") == 0 ? 0 : 1;
getRating();
get_attributes();
}
window.Repaint();
}
function on_size(){
ww = window.Width;
wh = window.Height;
}
function on_mouse_mbtn_up(x,y) {
}
function Tooltipdelay(){
var timer = window.SetTimeout(function() {
Tooltip.Deactivate();
window.ClearTimeout(timer);
}, 2000);
}
function draw_star(gr, x, y, img_size, fill, line_thickness, color){
var radius = img_size / 2;
var radius_2 = radius / 2.61803;
line_thickness = line_thickness >= radius_2 ? radius_2 : line_thickness;
var delta = line_thickness / 2 * Math.tan(72 / 180 * Math.PI);
var points = [],
x_points_1 = [], y_points_1 = [];
x_points_2 = [], y_points_2 = [];
for (var i = 0; i < 10; i++) {
if (i % 2 == 0) {
x_points_1.push(x + ((radius - delta) * Math.cos(Math.PI * i / 10 * 2 - Math.PI / 2)));
y_points_1.push(y + ((radius - delta) * Math.sin(Math.PI * i / 10 * 2 - Math.PI / 2)));
} else {
x_points_2.push(x + ((radius - delta) / 2.61803 * Math.cos(Math.PI * i / 10 * 2 - Math.PI / 2)));
y_points_2.push(y + ((radius - delta) / 2.61803 * Math.sin(Math.PI * i / 10 * 2 - Math.PI / 2)));
}
}
for (var i = 0; i < 5; i++) {
points.push(x_points_1[i], y_points_1[i], x_points_2[i], y_points_2[i]);
}
gr.SetSmoothingMode(2);
if(fill > 0) {
gr.FillPolygon(color, 1, points)
}
if(line_thickness > 0) {
gr.DrawPolygon(color, line_thickness, points);
}
}
// ==PREPROCESSOR==
// @name "Biography Text"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==
function RGB(r,g,b) { return (0xff000000|(r<<16)|(g<<8)|(b)); }
var a_font = gdi.Font("Arial",12,1);
var b_font = gdi.Font("Arial",12,0);
var ww,wh;
DT_LEFT = 0x00000000;
DT_RIGHT = 0x00000002;
DT_CENTER = 0x00000001;
DT_VCENTER = 0x00000004;
DT_SINGLELINE = 0x00000020;
DT_WORD_ELLIPSIS = 0x00040000;
DT_WORDBREAK = 0x00000010;
DT_CALCRECT = 0x00000400;
DT_NOPREFIX = 0x00000800;
var bgcolor = RGB(50,50,50);
var a_color = RGB(150,150,150);
var b_color = RGB(255,255,230);
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
var artist, old_artis;
var text = "", response = "";
var data = ""; b_text = "";
var col = 20;
var r_margin = 10;
var row = 50;
var b_text_row_height0;
var b_text_rows = 0;
var b_text_height = 0;
var s = 0;
var strings_array = [];
var b_text_array = [];
var metadb;
on_item_focus_change();
function on_paint(gr){
!window.IsTransparent && gr.FillSolidRect(0, 0, ww, wh, bgcolor);
gr.GdiDrawText(artist, a_font, a_color, col, 10, ww - 20, wh, DT_LEFT | DT_WORD_ELLIPSIS );
for (var i = 0; i < b_text_height; i++) {
gr.GdiDrawText(b_text_array[i + s], b_font, b_color, col, row + b_text_row_height * i, ww, wh, DT_LEFT );
}
}
function on_mouse_wheel(delta) {
if (b_text_rows > b_text_height){
if (delta < 0) {s = b_text_rows - s <= b_text_height ? b_text_rows - b_text_height : s += 1}
if (delta > 0) {s = s <= 0 ? 0 : s -= 1}
window.Repaint();
}
}
function on_mouse_move(x, y) {
on_mouse = true;
window.SetCursor(32649);
window.Repaint();
}
function on_mouse_leave() {
on_mouse = false;
window.SetCursor(32512);
window.Repaint();
}
function on_size(){
ww = window.Width;
wh = window.Height;
get_b_text_array();
}
function on_item_focus_change() {
text = "";
metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
if (metadb) on_metadb_changed();
}
function on_playlist_switch() {
on_item_focus_change();
}
function on_playback_new_track() {
on_item_focus_change();
}
function on_playback_dynamic_info_track() {
on_item_focus_change();
}
function on_playback_stop() {
on_item_focus_change();
}
function on_selection_changed(metadb) {
on_item_focus_change();
}
function Eval(field) {
if (metadb) {
path = fb.Titleformat("%path%").EvalWithMetadb(metadb);
return path.indexOf('://') > 0 ? fb.TitleFormat("[" + field + "]").Eval(true) : fb.TitleFormat("[" + field + "]").EvalWithMetadb(metadb);
}
}
function on_metadb_changed() {
artist = Eval("%artist%");
if (artist != old_artis){
response = "";
get();
old_artis = artist;
}
window.Repaint();
}
function get(){
if (artist == "" || artist == "?") {get_b_text_array(); return};
var url = ("http://www.theaudiodb.com/api/v1/json/1/search.php?s=" + encodeURIComponent(artist));
xmlhttp.open("GET", url, true);
//xmlhttp.open("POST", url, true);
//xmlhttp.setRequestHeader("Cache-Control", "no-cache");
//xmlhttp.setRequestHeader("Pragma", "no-cache");
xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
xmlhttp.send();
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
text = xmlhttp.responsetext;
try {
data = text;
json_data = JSON.parse(data);
json_data = json_data.artists;
items = json_data.length;
for (i = 0; i < items; i++) {
response = json_data[i].strBiographyRU;
if (response == null){
response = json_data[i].strBiographyEN;
}
}
} catch(e){}
get_b_text_array();
window.Repaint();
}
}
}
}
function get_b_text_array() {
s = 0;
strings_array = [];
b_text_array = [];
ww = window.Width;
temp_bmp = gdi.CreateImage(1, 1);
temp_gr = temp_bmp.GetGraphics();
b_text_row_height = temp_gr.CalcTextHeight("text", b_font)
strings_array = temp_gr.EstimateLineWrap(response, b_font, ww - col - r_margin).toArray();
for (var i = 0; i < strings_array.length; i += 2) {
b_text_array.push(strings_array[i]);
}
b_text_rows = b_text_array.length;
b_text_height = Math.ceil((wh - row - 20) / b_text_row_height);
temp_bmp.ReleaseGraphics(temp_gr);
temp_bmp.Dispose();
temp_gr = null;
temp_bmp = null;
}
Вернуться в Секреты foobar2000