Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WSH Panel Mod script discussion/help (Read 1399797 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

WSH Panel Mod script discussion/help

Reply #3475
@mire777,
I tested your script and google images doesn't work even i put the Google domain,I think you need to provide bio_photos.vbs??

Just copy 'download.vbs' from 'marc2003 folder', rename file in 'bio_photos.vbs'
And put this in main foobar folder.

WSH Panel Mod script discussion/help

Reply #3476
How can we add two last.fm similar artists panels in same panel?


that's not possible. autoplaylists, properties, musicbrainz, news-reviews-blogs, last.fm similar artists and last.fm charts all start off with this bit of code...

Code: [Select]
var li = new list(....


you can't have more than one instance of that in the same panel.

Quote
And following method you gave to me doesn't work with common8.js


replace

Code: [Select]
case li.lastfm_mode != 2 && li.lastfm_link == "autoplaylist":


with

Code: [Select]
case li.lastfm_mode != 2 && !li.lastfm_link:

WSH Panel Mod script discussion/help

Reply #3477
@mire777, i'll take a look at your script later.

I've noticed other oddities with the volume control, too. If you hover over say themed buttons you can change the volume with the mouse wheel.


i only just discovered this bug. it has now been fixed.

right click>Update script.

i've also made improvements to how tooltips appear. although my "fix" last week sort of worked, it wasn't the best.

these changes may have broken small web links if anyone uses that. if so, it can be downloaded again here: https://dl.dropboxusercontent.com/u/2280132...web%20links.txt


How do I revert this back so it the scroll wheel takes over the whole panel? I liked being able to control the volume with the wheel no matter where I was in the panel.

Also, is there a way to make double click on art reader open the media's containing folder even when there's no cover image? Right now, it's taking me to the stub image's folder when there is no cover image.

WSH Panel Mod script discussion/help

Reply #3478
How do I revert this back so it the scroll wheel takes over the whole panel?


open the panel and inside the on_mouse_wheel function, replace

Code: [Select]
v.wheel(step);


with

Code: [Select]
fb.Volume += step;


Quote
Also, is there a way to make double click on art reader open the media's containing folder even when there's no cover image?


my script doesn't know or care about your stub image not being actual art. it's presented as an image by the preferences! but you can modify the code. inside on_mouse_lbtn_dblclk, replace

Code: [Select]
a.lbtn_dblclk(x, y);


with

Code: [Select]
if (p.metadb) p.explorer(p.metadb.Path);


edit: that code makes the whole panel react to the double click. if the artreader only takes a smaller area, you can use this so it only triggers when the mouse is over it.

Code: [Select]
if (p.metadb && a.trace(x, y)) return p.explorer(p.metadb.Path);

WSH Panel Mod script discussion/help

Reply #3479
@mire777,
I tested your script and google images doesn't work even i put the Google domain,I think you need to provide bio_photos.vbs??

Just copy 'download.vbs' from 'marc2003 folder', rename file in 'bio_photos.vbs'
And put this in main foobar folder.

I did and now last.fm images are working but still no on google images :/.I looked at Artist_info folder folders are created but no images.
Console shows like this:
Thumbs: HTTP: http://www.google.lk/imgres?imgurl=http://...e_firsttime.jpg


Can some one tell me how to get "%playback time%/ %length%" to display on WSH panal??

WSH Panel Mod script discussion/help

Reply #3480
I did and now last.fm images are working but still no on google images :/.I looked at Artist_info folder folders are created but no images.
Console shows like this:
Thumbs: HTTP: http://www.google.lk/imgres?imgurl=http://...e_firsttime.jpg

Uh, my mistake
Try this. Should work now..

Code: [Select]
// ==PREPROCESSOR==
// @name "Biography Photos"
// @author "Mire777"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==

// Paths
var fbfolder = (fb.ProfilePath + "Artist_info");
var lfm_folder = window.GetProperty("Custom folder", fbfolder);

//Image download size
size = window.GetProperty("Download quality","medium");

//Download server
server = window.GetProperty("Download  source", "last.fm");

//Search terms(google)
terms = window.GetProperty("Custom search terms", "");

//Google domen
g_domain = window.GetProperty("Google domain", "com");

//Cycle
cycle2 = window.GetProperty("Image cycle", 10);

var MF_GRAYED = 0x00000001;
var MF_STRING = 0x00000000;
var IDC_ARROW = 32512;
var IDC_HAND = 32649;

function on_colors_changed() {
p.colors_changed();
}

function on_font_changed() {
//p.font_changed();
}

function on_selection_changed() {
p.item_focus_change();
}

function on_playlist_switch() {
p.item_focus_change();
}

function on_playback_new_track() {
p.item_focus_change();
}

function on_playback_dynamic_info_track() {
p.item_focus_change();
}

function on_playback_stop() {
p.item_focus_change();
}

function on_item_focus_change() {
p.item_focus_change();
}

function on_mouse_rbtn_up(x, y) {
p.rbtn_up(x, y);
return true;
}

//Start Futures
function panel(name, features) {
this.item_focus_change = function() {
if (!this.metadb_func) return;
  switch(this.selection_mode) {
  case 0:
this.metadb = fb.GetSelection();
break;
  case 1:
this.metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
break;
  case 2:
this.metadb = fb.GetFocusItem();
break;
}
if (this.metadb) on_metadb_changed();
}

//Size
this.size = function() {
this.w = window.Width;
this.h = window.Height;
}

//Move
this.move = function(x, y) {
this.mx = x;
this.my = y;
}

//Menu
this.rbtn_up = function(x, y) {
var _menu = window.CreatePopupMenu();

var idx;
switch(true) {
case typeof a == "object" && a.trace(x, y):

_menu.AppendMenuItem(MF_STRING, 17, "adjust");
_menu.AppendMenuItem(MF_STRING, 18, "Stretch");
_menu.CheckMenuRadioItem(15, 18, a.type == "centre" ? 15 : a.type == "top" ? 16 : a.type == "adjust" ? 17 : 18);
_menu.AppendMenuSeparator();
break;

case typeof th == "object":
case typeof im == "object" && im.trace(x, y):

var _settings = window.CreatePopupMenu();
var _auto_cycle = window.CreatePopupMenu();
var _download_source = window.CreatePopupMenu();
var _download_limit = window.CreatePopupMenu();
var _download_quality = window.CreatePopupMenu();
var _thumbs = window.CreatePopupMenu();
var MF_POPUP = 0x00000010;  

_menu.AppendMenuItem(MF_STRING, 403, "Refresh");
_menu.AppendMenuSeparator();

//Settings Menu
_menu.AppendMenuItem(MF_STRING | MF_POPUP, _settings.ID, "Settings");
_menu.AppendMenuSeparator();
_settings.AppendMenuItem(MF_STRING | MF_POPUP, _auto_cycle.ID, "Auto Cycle");

_auto_cycle.AppendMenuItem(MF_STRING, 415, "05 sec");
_auto_cycle.AppendMenuItem(MF_STRING, 420, "10 sec");
_auto_cycle.AppendMenuItem(MF_STRING, 425, "15 sec");
_auto_cycle.AppendMenuItem(MF_STRING, 430, "20 sec");
_auto_cycle.AppendMenuItem(MF_STRING, 410, "Off");
_auto_cycle.CheckMenuRadioItem(410, 430, cycle2 + 410);


_settings.AppendMenuItem(MF_STRING | MF_POPUP, _download_source.ID, "Download Source");

_download_source.AppendMenuItem(MF_STRING, 1902, "Last.fm");
_download_source.AppendMenuItem(MF_STRING, 1903, "Google");
_download_source.CheckMenuRadioItem(1902, 1904, server == "last.fm" ? 1902 : server == "google" ? 1903 : 1903);

_settings.AppendMenuItem(MF_STRING | MF_POPUP, _download_limit.ID, "Download Limit");
 
_download_limit.AppendMenuItem(MF_STRING, 1905, "1x");
_download_limit.AppendMenuItem(MF_STRING, 1906, "2x");
_download_limit.AppendMenuItem(MF_STRING, 1907, "3x");
_download_limit.AppendMenuItem(MF_STRING, 1908, "4x");
_download_limit.AppendMenuItem(MF_STRING, 1909, "5x");
_download_limit.AppendMenuItem(MF_STRING, 1910, "6x");
_download_limit.CheckMenuRadioItem(1905, 1910, im.limit + 1904);


if (server=="last.fm") _settings.AppendMenuItem(MF_STRING | MF_POPUP, _download_quality.ID, "Download Quality");
_download_quality.AppendMenuItem(MF_STRING, 1911, "Low");
_download_quality.AppendMenuItem(MF_STRING, 1912, "Medium");
_download_quality.AppendMenuItem(MF_STRING, 1913, "High");
_download_quality.CheckMenuRadioItem(1911, 1913, size == "low" ? 1911 : size == "medium" ? 1912 : size == "high" ? 1913 : 1913);

_settings.AppendMenuItem(MF_STRING | MF_POPUP, _thumbs.ID, "Thumbs");

_thumbs.AppendMenuItem(MF_STRING, 1201, "Left");
_thumbs.AppendMenuItem(MF_STRING, 1202, "Right");
_thumbs.AppendMenuItem(MF_STRING, 1203, "Top");
_thumbs.AppendMenuItem(MF_STRING, 1204, "Bottom");
_thumbs.AppendMenuItem(MF_STRING, 1205, "Off");
_thumbs.CheckMenuRadioItem(1200, 1205, th.mode == "grid" ? 1200 : th.mode == "left" ? 1201 : th.mode == "right" ? 1202 : th.mode == "top" ? 1203 : th.mode == "bottom" ? 1204 : 1205);

if (th.mode == "left" | th.mode == "right" | th.mode == "top" | th.mode == "bottom")
{
_thumbs.AppendMenuSeparator();
_thumbs.AppendMenuItem(MF_STRING, 1240, "40px");
_thumbs.AppendMenuItem(MF_STRING, 1250, "50px");
_thumbs.AppendMenuItem(MF_STRING, 1260, "60px");
_thumbs.AppendMenuItem(MF_STRING, 1270, "70px");
_thumbs.AppendMenuItem(MF_STRING, 1280, "80px");
_thumbs.AppendMenuItem(MF_STRING, 1290, "90px");
_thumbs.AppendMenuItem(MF_STRING, 1300, "100px");
_thumbs.AppendMenuItem(MF_STRING, 1350, "150px");
_thumbs.AppendMenuItem(MF_STRING, 1400, "200px");
_thumbs.AppendMenuItem(MF_STRING, 1450, "250px");
_thumbs.AppendMenuItem(MF_STRING, 1500, "300px");
_thumbs.CheckMenuRadioItem(1240, 1500, th.px + 1200);
}
  {
_menu.AppendMenuItem(MF_STRING, 400, "Open Folder");
if (server=="last.fm") _menu.AppendMenuItem(MF_STRING, 21, "Open Last.fm");
if (server=="google")  _menu.AppendMenuItem(MF_STRING, 21, "Open Google");
//_menu.AppendMenuItem(MF_STRING, 402, "Delete image");
_menu.AppendMenuSeparator();
_menu.AppendMenuItem(MF_STRING, 405, "Top");
_menu.AppendMenuItem(MF_STRING, 404, "Centre");
_menu.AppendMenuItem(MF_STRING, 406, "Adjust");
_menu.AppendMenuItem(MF_STRING, 407, "Stretch");
_menu.CheckMenuRadioItem(404, 407, im.type == "centre" ? 404 : im.type == "top" ? 405 : im.type == "adjust" ? 406 : 407);
_menu.AppendMenuSeparator();
}
break;
}

if (typeof ps == "object") _menu.AppendMenuItem(l.username.length > 0 ? MF_STRING : MF_GRAYED, 1901, "Last.fm password...");

_menu.AppendMenuItem(MF_STRING, 9, "Properties...");
if (utils.IsKeyPressed(0x10)) _menu.AppendMenuItem(MF_STRING, 10, "Configure...");
idx = _menu.TrackPopupMenu(x, y);
switch(idx) {

case 9:
window.ShowProperties();
break;
case 10:
window.ShowConfigure();
break;

case 15:
case 16:
case 17:
case 18:
a.type = idx == 15 ? "centre" : idx == 16 ? "top" : idx == 17 ? "adjust" : "stretch";
window.SetProperty("artreader_image_type", a.type);
window.RepaintRect(a.x, a.y, a.w, a.h);
break;

case 21:
if (server=="last.fm") this.browser("http://www.last.fm/music/" + encodeURIComponent(p.artist));
else
if (server=="google")  this.browser("https://www.google.rs/search?&tbm=isch&q=" + encodeURIComponent(p.artist) + "+" + terms);
break;

case 400:
this.run("explorer /select,\"" + im.files[im.index] + "\"");
break;

case 403:
if (im.images.length < im.limit)
{
p.run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8");
//fix_limit = im.limit;
im.download();
im.update();
}
else
p.run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8");
im.update();
break;
case 404:
case 405:
case 406:
case 407:
im.type = idx == 404 ? "centre" : idx == 405 ? "top" : idx == 406 ? "adjust" : "stretch";
window.SetProperty("Image type", im.type);
window.Repaint();
break;
case 410:
case 415:
case 420:
case 425:
case 430:
cycle2 = idx - 410;
window.SetProperty("Image cycle", cycle2);
cicleTimer = undefined;
cicleTimerStarted = false;
stopTimer();
startTimer();
cicleTimerStarted = true;
break;

case 1200:
case 1201:
case 1202:
case 1203:
case 1204:
case 1205:
th.mode = idx == 1200 ? "grid" : idx == 1201 ? "left" : idx == 1202 ? "right" : idx == 1203 ? "top" : idx == 1204 ? "bottom" : "off";
window.SetProperty("Thumbs mode", th.mode);
th.nc = true;
on_size();
window.Repaint();
break;
case 1240:
case 1250:
case 1260:
case 1270:
case 1280:
case 1290:
case 1300:
case 1350:
case 1400:
case 1450:
case 1500:
th.px = idx - 1200;
window.SetProperty("Thumbs px", th.px);
th.nc = true;
on_size();
window.Repaint();
break;

case 1902:
case 1903:
case 1904:
server = idx == 1902 ? "last.fm" : idx == 1903 ? "google" : "google";
window.SetProperty("Download  source", server);
break; 

case 1905:
case 1906:
case 1907:
case 1908:
case 1909:
case 1910:
im.limit = idx - 1904;
window.SetProperty("Download limit", im.limit);
break;

case 1911:
case 1912:
case 1913:
size = idx == 1911 ? "low" : idx == 1912 ? "medium" : idx == 1913 ? "high" : "high";
window.SetProperty("Download quality", size);
break;
}
_menu.Dispose();

}

//Futures Init
this.features_init = function() {
for (i = 0; i < this.features.length; i++) {
switch(this.features[i]) {

case "metadb":
this.selection_mode = window.GetProperty("Selection mode", 1);
break;

case "remap":
this.artist_tf = window.GetProperty("Artist format", "%artist%");
break;
}}}

//Check Future
this.check_feature = function(f) {
for (i = 0; i < this.features.length; i++) {
if (this.features[i] == f) return true;
}
return false;
}

//Eval Title/Format
this.eval = function(tf) {
if (!this.metadb || tf == "") return "";
if (fb.IsPlaying && this.metadb.RawPath.indexOf("file://") != 0) {
return fb.TitleFormat(tf).Eval();
} else {
return fb.TitleFormat(tf).EvalWithMetadb(this.metadb);
}}

//Console
this.console = function(message) {
fb.trace(this.name + ": " + message);
}

//Msg Box
this.MsgBox = function(prompt, buttons, title) {
prompt = prompt.replace(/"/g, '" + Chr(34) + "').replace(/\n/g, '" + Chr(13) + "');
title = title.replace(/"/g, '" + Chr(34) + "');
return this.vb.eval('MsgBox' + '("' + prompt + '", "' + buttons + '", "' + title + '")');
}

//Open In Browser
this.browser = function(command) {
if (!this.run(command)) this.MsgBox("Unable to launch your default browser.", 0, this.name);
}

//Run Command
this.run = function(command) {
try {
  this.WshShell.Run(command);
  return true;
  } catch(e) {
  return false;
}}

//Display Image
this.draw_image = function(gr, img, pos_x, pos_y, width, height, type, border, alpha) {
if (!img) return;
gr.SetInterpolationMode(7);
  switch(type) {
case "centre":
case "top":
  {
var sr = img.Width / img.Height;
var dr = width / height;
if (sr < dr) {
var r = img.Width / width;
var ch = height * r;
var sy = Math.round((img.Height - ch) / (type == "top" ? 1000 : 2));
var cw = img.Width;
var sx = 0;
} else {
var r = img.Height / height;
var cw = width * r;
var sx = Math.round((img.Width - cw) / 2);
var ch = img.Height;
var sy = 0;
}
  {
gr.DrawImage(img, pos_x, pos_y, width, height, sx + 5, sy + 5, cw - 10, ch - 10, 0, alpha || 255);
if (border) gr.DrawRect(pos_x, pos_y, width - 1, height - 1, 1, border);
  }
}
break;
case "stretch":
//strech
gr.DrawImage(img, pos_x, pos_y, width, height, 5, 5, img.Width-10, img.Height-10, 0, alpha || 255);
if (border) gr.DrawRect(pos_x, pos_y, width - 1, height - 1, 1, border);

break;
case "adjust":
default:
//adjust
var s = Math.min(width / img.Width, height / img.Height);
var nw = Math.round(img.Width * s);
var nh = Math.round(img.Height * s);
pos_x += Math.round((width - nw) / 2);
pos_y += Math.round((height - nh) / 2);

gr.DrawImage(img, pos_x, pos_y, nw, nh, 5, 5, img.Width-10, img.Height-10, 0, alpha || 255);
if (border) gr.DrawRect(pos_x, pos_y, nw - 1, nh - 1, 1, border);
break;

}
}

//Remove false string from file names
this.clean_filename = function(filename) {
return filename.replace(/[\/\\|:]/g, '-').replace(/\*/g, 'x').replace(/"/g, "''").replace(/[?<>]/g, '_');
}

this.name = name;
this.features = features;
this.dui = window.InstanceType;
this.script_path = fb.ProfilePath;
this.w = 0;
this.h = 0;
this.mx = 0;
this.my = 0;
this.metadb = fb.GetFocusItem();
this.WshShell = new ActiveXObject("WScript.Shell");
this.fso = new ActiveXObject("Scripting.FileSystemObject");

this.data_folder = lfm_folder + "\\";
if (lfm_folder==fb.ProfilePath + "Artist_info") if (!this.fso.FolderExists(this.data_folder)) this.fso.CreateFolder(this.data_folder), this.data_folder=this.data_folder;
if (!this.fso.FolderExists(this.data_folder)) return; 
this.artist = "";
this.artist_tf = "%artist%";

this.metadb_func = typeof on_metadb_changed == "function";
this.features_init();
}

function artreader(x, y, w, h) {
this.draw = function(gr) {
if (!this.img) return;
p.draw_image(gr, this.img, this.x, this.y, this.w, this.h, this.type);
}

this.trace = function(x, y) {
return (x > this.x && x < this.x + this.w && y > this.y && y < this.y + this.h);
}

this.wheel = function(step) {
if (!this.trace(p.mx, p.my)) return false;
this.id -= step;
if (this.id < 0) this.id = 4;
if (this.id > 4) this.id = 0;
window.SetProperty("artreader_id", this.id);
this.metadb_changed();
return true;
}

this.move = function(x, y) {
if (this.trace(x, y)) {
if (this.img) p.tt("Original size: " + this.img.Width + "x" + this.img.Height + "px");
return true;
} else {
p.ttd();
return false;
}}

this.lbtn_dblclk = function(x, y) {
if (!this.trace(x, y)) return false;
if (this.img) p.run("explorer /select,\"" + this.path + "\"");
return true;
}

this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.img = null;
this.path = null;
}

function images(x, y, w, h) {
this.playback_time = function(time) {
}

this.draw = function (gr) {
if (this.images.length == 0) return;
p.draw_image(gr, this.images[this.index], this.x, this.y, this.w, this.h, this.type);
}

//MetaDB
this.metadb_changed = function() {
if (!p.metadb) return false;
switch(this.mode) {
case "last.fm":
p.artist = p.eval(p.artist_tf);
if (this.artist == p.artist) return false;
this.artist = p.artist;
this.folder = p.data_folder + p.clean_filename(p.artist);
if (!p.fso.FolderExists(this.folder)) p.fso.CreateFolder(this.folder);
break;
}
this.update();
return true;
}

this.trace = function(x, y) {
return (x > this.x && x < this.x + this.w && y > this.y && y < this.y + this.h);
}

this.wheel = function(step) {
if (!p.metadb || this.images.length < 2 || !this.trace(p.mx, p.my) || (typeof th == "object" && th.mode == "grid" && !th.overlay)) return false;
this.index -= step;
if (this.index < 0) this.index = this.images.length - 1;
if (this.index >= this.images.length) this.index = 0;
window.RepaintRect(this.x, this.y, this.w, this.h);
return true;
}

//Db-Click
this.lbtn_dblclk = function(x, y) {
if (!this.trace(x, y)) return false;
p.run("\"" + this.files[this.index] + "\"");
return true;
}

//Download Image
this.download = function()
{
if (!p.fso.FolderExists(this.folder))  return;
{

if (server=="last.fm")
{{
this.working=true;
if (p.artist == "" || p.artist == "?") return;
var folder = this.folder + "\\";
if (!this.xmlhttp) this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
this.xmlhttp.open("GET", "http://www.last.fm/music/" + encodeURIComponent(p.artist) + "/+images", true);
this.xmlhttp.send();
this.xmlhttp.onreadystatechange = function() {
if (im.xmlhttp.readyState == 4) {
if (im.xmlhttp.status == 200) {
var text = im.xmlhttp.responsetext;
if (!im.doc) im.doc = new ActiveXObject("htmlfile");
im.doc.open();
var div = im.doc.createElement("div");
div.innerHTML = text;
var data = div.getElementsByTagName("img");
var urls = [];
for (i = 0; i < data.length; i++) {
if (data[i].src.indexOf("http://userserve-ak.last.fm/serve/126s") == 0) urls.push(data[i].src.replace("126s", size == "low" ? "252" : size == "medium" ? "500" : size == "high" ? "_" : "_"));
}
fix_limit = im.limit;
for (i = 0; i < Math.min(urls.length, fix_limit, 50); i++) {
p.WshShell.Run("cscript //nologo \"" + p.script_path + "bio_photos.vbs\" \"" + urls[i] + "\" \"" + [folder + p.clean_filename(p.artist) + "_" + i] + urls[i].substring(urls[i].lastIndexOf("/")+1000) + ".jpg" + "\"" , 0, true);
if (im.images.length == 0) {im.update(); fix_limit = im.limit+1;}
if (im.images.length == 0) {return;}
}
im.doc.close();
im.working=false;
im.update();
window.NotifyOthers("images", "update");
} else {
p.console("HTTP error: " + im.xmlhttp.status);
}}}}}

else

if (server=="google")
{{
this.working=true;  
if (p.artist == "" || p.artist == "?") return;
var folder = this.folder + "\\";
if (!this.xmlhttp) this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
this.xmlhttp.open("GET", "https://www.google." + g_domain + "/search?&tbm=isch&q=" + encodeURIComponent(p.artist) + terms + "&tbm=isch&tbs=isz:m", true);
this.xmlhttp.send();
this.xmlhttp.onreadystatechange = function() {
if (im.xmlhttp.readyState == 4) {
if (im.xmlhttp.status == 200) {
var text = im.xmlhttp.responsetext;
if (!im.doc) im.doc = new ActiveXObject("htmlfile");
im.doc.open();
var div = im.doc.createElement("div");
div.innerHTML = text;
var data = div.getElementsByTagName("a");
var urls = [];

for (i = 0; i < data.length; i++) {
if (data[i].href.indexOf("imgurl=") > 0) urls.push(data[i].href.split("imgurl=")[1].split("&imgrefurl")[0]);
}
fix_limit = im.limit;
for (i = 0; i < Math.min(urls.length, fix_limit, 50); i++) {
urls[i] = decodeURIComponent(urls[i]);
p.console("HTTP: " + urls[i]);
p.WshShell.Run("cscript //nologo \"" + p.script_path + "bio_photos.vbs\" \"" + decodeURIComponent(urls[i]) + "\" \"" + [folder + p.clean_filename(p.artist) + "_" + i] + decodeURIComponent(urls[i]).substring(decodeURIComponent(urls[i]).lastIndexOf("d")+1000) + ".jpg" + "\"" , 0, true);
if (im.images.length == 0) {fix_limit = im.limit+1; im.update();}
if (im.images.length == 0) {return;}
}
im.doc.close();
im.working=false;
im.update();
window.NotifyOthers("images", "update");
} else {
p.console("HTTP error: " + im.xmlhttp.status + urls);
}}}}}}}


this.update = function() {
this.index = 0;
for (i = 0; i < this.images.length; i++) {
try { this.images[i].Dispose(); } catch(e) {}
}
this.folders = this.folder.split("|");
this.files = [];
for (i = 0; i < this.folders.length; i++) {
if (p.fso.FolderExists(this.folders[i])) this.files = this.files.concat(utils.Glob(this.folders[i] + "\\*.jpg").toArray(), utils.Glob(this.folders[i] + "\\*.jpeg").toArray(), utils.Glob(this.folders[i] + "\\*.png").toArray(), utils.Glob(this.folders[i] + "\\*.gif").toArray());
}

this.images = [];
for (i = 0; i < this.files.length; i++) {
this.images[i] = gdi.Image(this.files[i]);
}
if (typeof th == "object") {
th.nc = true;
th.calc();
}
  window.Repaint();
}

//Delete Image
this.delete_image = function() {
if (!this.app) this.app = new ActiveXObject("Shell.Application");
this.app.Namespace(10).MoveHere(this.files[this.index]);
window.SetTimeout(function() {
im.update();
window.NotifyOthers("images", "update");
}, 100);
}

this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.files = [];
this.images = [];
this.index = 0;
this.artist = "";
this.folder = "";
this.limit = window.GetProperty("Download limit", 6);
this.mode = ("last.fm");
this.type = window.GetProperty("Image type", "adjust");
this.auto_download = window.GetProperty("Download  [on/off]", "on");
}

//Thumbs
function thumbs() {
this.trace = function(x, y) {
return (x > this.x && x < this.x + this.w && y > this.y && y < this.y + this.h);
}

this.draw = function(gr) {
switch(true) {
case im.images.length == 0:
break;
case this.mode == "off":
p.draw_image(gr, im.images[im.index], im.x, im.y, im.w, im.h, im.type);
break;
case !this.img:
break;
case this.mode == "grid":
gr.DrawImage(this.img, this.x, this.y, this.w, this.h, 0, this.offset * this.px, this.w, this.h);
if (this.overlay) {
gr.FillSolidRect(this.x, this.y, this.w, this.h, RGBA(0, 0, 0, 126));
p.draw_image(gr, im.images[im.index], im.x, im.y, im.w, im.h, "adjust");
}
break;
case this.mode == "left":
case this.mode == "right":
gr.DrawImage(this.img, this.x, this.y, this.w, this.h, 0, this.offset * this.px, this.w, this.h);
p.draw_image(gr, im.images[im.index], im.x, im.y, im.w, im.h, im.type);
break;
case this.mode == "bottom":
case this.mode == "top":
gr.DrawImage(this.img, this.x, this.y, this.w, this.h, this.offset * this.px, 0, this.w, this.h);
p.draw_image(gr, im.images[im.index], im.x, im.y, im.w, im.h, im.type);
break;
}}

this.calc = function() {
this.offset = 0;
switch(true) {
case p.w < this.px || p.h < this.px || this.mode == "off":
this.nc = true;
this.img && this.img.Dispose();
this.img = null;
im.x = 0;
im.y = 0;
im.w = p.w;
im.h = p.h;
break;
case this.mode == "grid":
this.x = 0;
this.y = 0;
this.w = p.w;
this.h = p.h;
im.x = 40;
im.y = 40;
im.w = this.w - 80;
im.h = this.h - 80;
if (!this.nc && this.columns != Math.floor(this.w / this.px)) this.nc = true;
this.overlay = false;
this.rows = Math.ceil(this.h / this.px);
this.columns = Math.floor(this.w / this.px);
this.img_rows = Math.ceil(im.images.length / this.columns);
if (this.nc && im.images.length > 0) {
this.nc = false;
this.img && this.img.Dispose();
this.img = null;
this.img = gdi.CreateImage(Math.min(this.columns, im.images.length) * this.px, this.img_rows * this.px);
var temp_gr = this.img.GetGraphics();
temp_gr.SetInterpolationMode(7);
var ci = 0;
var row, col;
for (row = 0; row < this.img_rows; row++) {
for (col = 0; col < this.columns; col++) {
if (ci == im.images.length) continue;
p.draw_image(temp_gr, im.images[ci], col * this.px, row * this.px, this.px, this.px, "top");
ci++;
}}
this.img.ReleaseGraphics(temp_gr);
temp_gr = null;
}
break;
case this.mode == "left":
case this.mode == "right":
this.x = this.mode == "left" ? 0 : p.w - this.px;
this.y = 0;
this.w = this.px;
this.h = p.h;
im.x = this.mode == "right" ? 0 : this.px;
im.y = 0;
im.w = p.w - this.px;
im.h = p.h;
this.rows = Math.ceil(this.h / this.px);

if (this.nc && im.images.length > 0) {
this.nc = false;
this.img && this.img.Dispose();
this.img = null;
this.img = gdi.CreateImage(this.px, this.px * im.images.length);
var temp_gr = this.img.GetGraphics();
temp_gr.SetInterpolationMode(7);
for (i = 0; i < im.images.length; i++) {
p.draw_image(temp_gr, im.images[i], 0, i * this.px, this.px, this.px, "top");
}
this.img.ReleaseGraphics(temp_gr);
temp_gr = null;
}
break;
case this.mode == "bottom":
case this.mode == "top":
this.x = 0;
this.y = this.mode == "top" ? 0 : p.h - this.px;
this.w = p.w;
this.h = this.px;
im.x = 0;
im.y = this.mode == "bottom" ? 0 : this.px;
im.w = p.w;
im.h = p.h - this.px;
this.columns = Math.ceil(this.w / this.px);

if (this.nc && im.images.length > 0) {
this.nc = false;
this.img && this.img.Dispose();
this.img = null;
this.img = gdi.CreateImage(this.px * im.images.length, this.px);
var temp_gr = this.img.GetGraphics();
temp_gr.SetInterpolationMode(7);
for (i = 0; i < im.images.length; i++) {
p.draw_image(temp_gr, im.images[i], i * this.px, 0, this.px, this.px, "top");
}
this.img.ReleaseGraphics(temp_gr);
temp_gr = null;
}
break;
}}

this.wheel = function(step) {
switch(true) {
case !this.trace(p.mx, p.my):
case this.overlay:
return false;
case this.mode == "grid":
if (this.img_rows < this.rows) return true;
this.offset -= step;
if (this.offset < 0) this.offset = 0;
if (this.offset > this.img_rows - this.rows) this.offset = this.img_rows - this.rows + 1;
break;
case this.mode == "left":
case this.mode == "right":
if (im.images.length < this.rows) return true;
this.offset -= step;
if (this.offset < 0) this.offset = 0;
if (this.rows + this.offset > im.images.length) this.offset = im.images.length - this.rows + 1;
break;
case this.mode == "bottom":
case this.mode == "top":
if (im.images.length < this.columns) return true;
this.offset -= step;
if (this.offset < 0) this.offset = 0;
if (this.columns + this.offset > im.images.length) this.offset = im.images.length - this.columns + 1;
break;
}
window.RepaintRect(this.x, this.y, this.w, this.h);
return true;
}

this.move = function(x, y) {
switch(true) {
case !this.trace(x, y):
window.SetCursor(IDC_ARROW);
return false;
case this.overlay:
window.SetCursor(IDC_ARROW);
return true;
case this.mode == "grid":
this.index = Math.floor((x - this.x) / this.px) + (Math.floor((y - this.y) / this.px) * this.columns) + (this.offset * this.columns);
break;
case this.mode == "left":
case this.mode == "right":
this.index = Math.floor((y - this.y) / this.px) + this.offset;
break;
case this.mode == "bottom":
case this.mode == "top":
this.index = Math.floor((x - this.x) / this.px) + this.offset;
break;
}
window.SetCursor(this.index < im.images.length ? IDC_HAND : IDC_ARROW);
return true;
}

this.lbtn_up = function(x, y) {
switch(true) {
case !this.trace(x, y):
return false;
case this.mode == "grid" && this.overlay && im.trace(x, y):
this.overlay = false;
window.Repaint();
break;
case this.mode == "grid" && this.index < im.images.length && !this.overlay:
this.overlay = true;
im.index = this.index;
window.Repaint();
break;
case this.overlay:
break;
case this.index < im.images.length:
im.index = this.index;
window.Repaint();
}
return true;
}

this.lbtn_dblclk = function(x, y) {
if (!im.trace(x, y) || th.mode == "grid") return false;
p.run("\"" + im.files[im.index] + "\"");
return true;
}

this.nc = false;
this.mode = window.GetProperty("Thumbs mode", p.check_feature("now_playing") ? "off" : "off");
this.px = window.GetProperty("Thumbs px", 40);
this.img = null;
}

//START---->
var p = new panel("Thumbs", ["remap", "metadb"]);
var im = new images(0, 0, 0, 0);
var th = new thumbs();

on_item_focus_change();

function on_playback_time(time) {
im.playback_time(time);
}

function on_size() {
p.size();
th.calc();
}

function on_paint(gr) {
th.draw(gr);
}

function on_metadb_changed() {
im.metadb_changed();
if (im.images.length == 0 && im.auto_download=="on")
im.download();
}

function on_mouse_wheel(step) {
if (th.wheel(step)) return;
if (im.wheel(step)) return;
}

function on_mouse_move(x, y) {
p.move(x, y);
th.move(x, y);
}

function on_mouse_lbtn_up(x, y) {
th.lbtn_up(x, y);
}

function on_mouse_lbtn_dblclk(x, y) {
th.lbtn_dblclk(x, y);
}

//Auto Cycle Image
var cicleTimerStarted = false;
var cicleTimer = null;
 
(function startTimer(){
 
if(!cicleTimerStarted){

cicleTimer = window.CreateTimerInterval(cycle2+"000");
cicleTimerStarted = true;
}
 
})();
 
function stopTimer(){
 
if(!cicleTimerStarted) return;
window.KillTimer(cicleTimer);
cicleTimer = undefined;
cicleTimerStarted = false;
 
}
 
function on_timer(id) {
if(cicleTimer && id == cicleTimer.ID){
 
{
do{
im.index++
if (im.index == im.images.length) im.index=0;
window.Repaint();
}while (im.index==-1);
}}}

WSH Panel Mod script discussion/help

Reply #3481
How do I revert this back so it the scroll wheel takes over the whole panel?


open the panel and inside the on_mouse_wheel function, replace

Code: [Select]
v.wheel(step);


with

Code: [Select]
fb.Volume += step;


Quote
Also, is there a way to make double click on art reader open the media's containing folder even when there's no cover image?


my script doesn't know or care about your stub image not being actual art. it's presented as an image by the preferences! but you can modify the code. inside on_mouse_lbtn_dblclk, replace

Code: [Select]
a.lbtn_dblclk(x, y);


with

Code: [Select]
if (p.metadb) p.explorer(p.metadb.Path);


edit: that code makes the whole panel react to the double click. if the artreader only takes a smaller area, you can use this so it only triggers when the mouse is over it.

Code: [Select]
if (p.metadb && a.trace(x, y)) return p.explorer(p.metadb.Path);



This worked, thanks!

On another note, is it possible to use WSH to replace playlist tabs and/or the regular DUI tabs?



WSH Panel Mod script discussion/help

Reply #3484
Do you have anything like that for regular (DUI) tabs?


that's not possible. if you used columns UI, you could use the panel stack splitter component which allows you to make buttons that will show/hide panels.

 

WSH Panel Mod script discussion/help

Reply #3485
Uh, my mistake
Try this. Should work now..

It's working now , thank you for this.It's great for local artists which don't have last.fm


@marc20003
How to display "%playback time%/ %length%" in your now playing panel??
I tried like this but playback time stays the same,
Code: [Select]
fb.TitleFormat("%playback_time%").Eval()+ "/" +p.eval("[%length%]")

WSH Panel Mod script discussion/help

Reply #3486
Do you have anything like that for regular (DUI) tabs?


that's not possible. if you used columns UI, you could use the panel stack splitter component which allows you to make buttons that will show/hide panels.


Ah, I see.

By the way, I just noticed that on the latest version of your script, tooltips on buttons don't show up. Can you take a look when you get a chance?

WSH Panel Mod script discussion/help

Reply #3487
you know what.... i ****ing hate tooltips. and those were the bloody things that got me into this component in the first place. 

i've had yet another attempt at fixing it. try again... right click>Update script.


WSH Panel Mod script discussion/help

Reply #3489
Haha... well that worked. Thanks!

WSH Panel Mod script discussion/help

Reply #3490
How to display "%playback time%/ %length%" in your now playing panel??
I tried like this but playback time stays the same,


you need to redraw every second for that to work. add in this extra line of code in the on_playback_time function.

Code: [Select]
function on_playback_time(time) {
    th.playback_time(time);
    window.RepaintRect(x,y,w,h);
}


hopefully you can figure out the x,y,w,h values yourself.

WSH Panel Mod script discussion/help

Reply #3491
How to display "%playback time%/ %length%" in your now playing panel??
I tried like this but playback time stays the same,


you need to redraw every second for that to work. add in this extra line of code in the on_playback_time function.

Code: [Select]
function on_playback_time(time) {
    th.playback_time(time);
    window.RepaintRect(x,y,w,h);
}


hopefully you can figure out the x,y,w,h values yourself.


I use GdiDrawText for playback time and if(!fb.IsPlaying) to place just the length there when nothing is playing but a song is selected:

Code: [Select]
    gr.GdiDrawText(fb.TitleFormat("%playback_time%[ / %length%]").Eval(), font, color, x, y, w, h, align);
    if(!fb.IsPlaying) {
        p.left_text(gr, p.eval("%length%"), font, color,x, y, w, h);
    }

WSH Panel Mod script discussion/help

Reply #3492
Uh, my mistake
Try this. Should work now..


sorry, i forgot all about checking this out. i'm also seeing problems with google even using the last version you posted. i see this in the console:

Code: [Select]
Thumbs: HTTP error: 0undefined


it's also retrying on some sort of timer which is not good. i'd remove that if i were you. i'm not even going to try and pick apart what you've done. i might take a look if you post an updated common8 version with that template i gave you.

WSH Panel Mod script discussion/help

Reply #3493
A 140-page topic and no index at all in the first post ?...  No list of the available scripts with download links ?... Really ?... 
Sorry for the rant but I think that it's fair to say it. For all of you regular readers of this thread it's fine, but you can't expect anybody else to simply go through all 140 pages to find what s/he needs, right ?

WSH Panel Mod script discussion/help

Reply #3494
sorry, i forgot all about checking this out. i'm also seeing problems with google even using the last version you posted. i see this in the console:

Code: [Select]
Thumbs: HTTP error: 0undefined


it's also retrying on some sort of timer which is not good. i'd remove that if i were you. i'm not even going to try and pick apart what you've done. i might take a look if you post an updated common8 version with that template i gave you.


Yes, timer should be changed, i will post script with common8 later.
''0undefined'' mean that you didn't change google domain in properties?
Or your browser redirecting page to use ''http'' instead of ''https'' or something like that?

WSH Panel Mod script discussion/help

Reply #3495
@wcs13, here's a link to my completed scripts:

http://marc2003.x10host.com/intro

and some by falstaff.

http://pastebin.com/u/Br3tt

but it would be better to ignore the WSH playlist on that page and use this updated version: http://br3tt.deviantart.com/art/WSH-Playli...0-0-8-368997689

@mire777, i changed domain to co.uk and at least there is no error. so i looked at it some more....
Code: [Select]
var data = div.getElementsByTagName("a");
var urls = [];

for (i = 0; i < data.length; i++) {
    if (data[i].href.indexOf("imgurl=") > 0) urls.push(data[i].href.split("imgurl=")[1].split("&imgrefurl")[0]);
}
p.console(data.length); //outputs 95
p.console(urls.length); //outputs 0


so the bit inside the for loop is where it fails to get any results???

WSH Panel Mod script discussion/help

Reply #3496
@mire777, i changed domain to co.uk and at least there is no error. so i looked at it some more....
Code: [Select]
var data = div.getElementsByTagName("a");
var urls = [];

for (i = 0; i < data.length; i++) {
    if (data[i].href.indexOf("imgurl=") > 0) urls.push(data[i].href.split("imgurl=")[1].split("&imgrefurl")[0]);
}
p.console(data.length); //outputs 95
p.console(urls.length); //outputs 0


so the bit inside the for loop is where it fails to get any results???


Did you receive any images?

Is it possible that in your country html is different?
Dont know? But if string is not "imgurl=" on the beginning and "&imgrefurl" on the end,  then it will fail..
Inside that should be url for image..

WSH Panel Mod script discussion/help

Reply #3497
Is it possible that in your country html is different?


yes, i think so. i checked the content of data.href inside the loop and it's nothing like what you're looking for. all i can see is links to webpages that contain the images - i can't see any links to images at all.

all you can do it make it work in your area. i'm not sure if you can get around it.

WSH Panel Mod script discussion/help

Reply #3498
@mire777

I tested it and I cannot reproduce what marc2003 see.
My location if it helps is Greece.

Modified to be more verbose and as you can see the array of links is generated.

Code: [Select]
if (server=="google")
{{
this.working=true;  
if (p.artist == "" || p.artist == "?") return;
var folder = this.folder + "\\";
if (!this.xmlhttp) this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        webpage = "https://www.google." + g_domain + "/search?&tbm=isch&q=" + encodeURIComponent(p.artist) + terms + "&tbm=isch&tbs=isz:m";
       
this.xmlhttp.open("GET", webpage, true);
this.xmlhttp.send();
this.xmlhttp.onreadystatechange = function() {
if (im.xmlhttp.readyState == 4) {
if (im.xmlhttp.status == 200) {
var text = im.xmlhttp.responsetext;
if (!im.doc) im.doc = new ActiveXObject("htmlfile");
im.doc.open();
var div = im.doc.createElement("div");
div.innerHTML = text;
var data = div.getElementsByTagName("a");
var urls = [];

                    p.console(webpage);

for (i = 0; i < data.length; i++) {
if (data[i].href.indexOf("imgurl=") > 0) urls.push(data[i].href.split("imgurl=")[1].split("&imgrefurl")[0]);
}
p.console(urls);
                    p.console(urls.length);
fix_limit = im.limit;
for (i = 0; i < Math.min(urls.length, fix_limit, 50); i++) {
urls[i] = decodeURIComponent(urls[i]);
p.console("HTTP: " + urls[i]);
                    run ="cscript //nologo \"" + p.script_path + "bio_photos.vbs\" \"" + decodeURIComponent(urls[i]) + "\" \"" + [folder + p.clean_filename(p.artist) + "_" + i] + decodeURIComponent(urls[i]).substring(decodeURIComponent(urls[i]).lastIndexOf("d")+1000) + ".jpg" + "\"";
p.console(run);
                    p.WshShell.Run(run, 0, true);
if (im.images.length == 0) {fix_limit = im.limit+1; im.update();}
if (im.images.length == 0) {return;}
}
im.doc.close();
im.working=false;
im.update();
window.NotifyOthers("images", "update");
} else {
p.console("HTTP error: " + im.xmlhttp.status + urls);
}}}}}}}

Console Output

Code: [Select]
[18:20:07] Thumbs: [url=https://www.google.co.uk/search?&tbm=isch&q=Lara%20Fabian&tbm=isch&tbs=isz:m]https://www.google.co.uk/search?&tbm=is...h&tbs=isz:m[/url] 
[18:20:07] Thumbs: [url=http://upload.wikimedia.org/wikipedia/commons/6/69/Lara_Fabian_2012.jpg,http://esctodaygdd.s3.amazonaws.com/wp-content/uploads/2013/01/lara_fabian_reference.jpg,http://images.uulyrics.com/cover/l/lara-fabian/album-lara-fabian.jpg,http://img3.closermag.fr/var/closermag/storage/images/actu-people/bio-de-stars/lara-fabian/815034-1-fre-FR/Lara-Fabian_exact442x442_l.jpg,http://plugnplaymusicblog.com/wp-content/uploads/2014/05/lara-fabian1.jpg,http://www.supermusic.sk/obrazky/2592843_Lara%252BFabian.jpg,http://cs10193.vk.me/u167792529/-7/x_c41aef6f.jpg,http://www.escireland.com/wp-content/uploads/2010/02/Lara%252BFabian.jpg,http://upload.wikimedia.org/wikipedia/commons/e/e0/Lara_Fabian.jpg,http://img.mypopulars.com/images/lara-fabian/Lara-Fabian-30.jpg,http://www.kboing.com.br/fotos/imagens/499c561c00cc9.jpg,http://www.360opps.com/wp-content/uploads/2011/04/Lara_Fabian.jpg,http://imstars.aufeminin.com/stars/fan/lara-fabian/lara-fabian-20061030-173926.jpg,http://musiccanada.files.wordpress.com/2011/07/lara-fabian.jpg,http://static1.purefans.com/items/5/30/17/25/%2540/301725-lara-fabian-sourire-fullscreen-1.jpg,http://s1.evcdn.com/images/edpborder500/I0-001/003/141/036-1.jpeg_/lara-fabian-36.jpeg,http://images2.fanpop.com/image/photos/11000000/Lara-Fabian-lara-fabian-11076136-624-919.jpg,http://images2.fanpop.com/image/photos/11000000/Lara-Fabian-lara-fabian-11076425-800-600.jpg,http://s.tf1.fr/mmdia/i/92/4/lara-fabian-2341924_1713.jpg%253Fv%253D1,http://www.librarising.com/astrology/celebs/images2/KL/larafabian.jpg,http://s3.evcdn.com/images/edpborder500/I0-001/004/322/234-3.jpeg_/lara-fabian-34.jpeg,http://www.inrumor.com/wp-content/uploads/2013/08/lara-fabian-no-makeup1.png,http://waytofamous.com/images/lara-fabian-03.jpg,http://img.mypopulars.com/images/lara-fabian/Lara-Fabian-4.jpg,http://mtdata.ru/u1/photo582B/20554630420-0/original.jpg,http://imstars.aufeminin.com/stars/fan/lara-fabian/lara-fabian-20080316-389541.jpg,http://libiz.net/images/36741-lara-fabian.jpg,http://www.starzik.com/Photos/Lara-Fabian-69916-E800.jpg,http://hollowverse.zippykid.netdna-cdn.com/wp-content/uploads/2013/03/lara-fabian-640x360.jpg,http://eil.com/images/main/Lara-Fabian-Sin-Ti-170170.jpg,http://images2.fanpop.com/image/photos/11000000/Lara-Fabian-lara-fabian-11076128-350-517.jpg,http://iv1.lisimg.com/image/2240013/600full-lara-fabian.jpg,http://i-cms.journaldesfemmes.com/image_cms/300/1744006-top-lara-fabian-rayonne-de-bonheur-sans-maquillage.jpg,http://4.bp.blogspot.com/-aLi2KPd3p_M/USPhCe8TK-I/AAAAAAAAF1M/yj9cEPOBL-w/s1600/Lara%252Bfabian%252Bred%252Bdress.jpg,http://www.oocities.org/pbfearme/lara_fabian_fansites_ring/lara_fabian_logo3.jpg,http://www.stars-portraits.com/img/portraits/stars/l/lara-fabian/lara-fabian-1-by-Jojemo%255B148360%255D.jpg,http://ilarge.listal.com/image/2393463/968full-lara-fabian.jpg,http://media.jukebo.com/news/Lara%252520Fabian.jpg,http://imstars.aufeminin.com/stars/fan/lara-fabian/lara-fabian-20040428-1407.jpg,http://max-pix.com/data/media/4306/Lara_Fabian_06_03.jpg,http://favimages.com/wp-content/uploads/2012/09/singer-lara-fabian-celebrity-star-interview.jpg,http://img.karaoketexty.cz/img/artists/3004/lara-fabian-58079.jpg,http://static1.purepeople.com/articles/4/13/01/64/%2540/1273746-exclusif-lara-fabian-quitte-son-950x0-1.jpg,http://userserve-ak.last.fm/serve/500/75486512/Lara%252BFabian%252B402090_306258116088488_1033905.jpg,http://cdn-premiere.ladmedia.fr/var/premiere/storage/images/tele/news-tele/lara-fabian-elle-prepare-une-emission-tele/22528804-4-fre-FR/Lara-Fabian-Elle-prepare-une-emission-tele_portrait_w532.jpg,http://s1.hubimg.com/u/7887088_f520.jpg,http://perlbal.hi-pi.com/blog-images/130471/gd/1163724643/lara-fabian.jpg,http://www.israbox.com/uploads/posts/2010-02/1266240145_5.jpg,http://www.celebirony.com/foto/cantanti/Lara_Fabian/lara_fabian_grande2.jpg,http://cdn3-public.ladmedia.fr/var/public/storage/images/news/photos/photos-lara-fabian-elle-devoile-tout-son-glamour-lors-du-new-wave-international-festival-430520/lara-fabian-lors-du-new-wave-international-festival-a-jurmala-le-27-juillet-2013-430523/5241580-1-fre-FR/Lara-Fabian-lors-du-New-Wave-International-Festival-a-Jurmala-le-27-juillet-2013_portrait_w674.jpg,http://imstars.aufeminin.com/stars/fan/lara-fabian/lara-fabian-20070313-225293.jpg,http://favimages.net/wp-content/uploads/2013/06/lara-fabian-celebrity-singer-musicians-woman-beautiful.jpg,http://cdn2.greatsong.net/photo/ext/lara-fabian-4406.jpg,http://www.oocities.org/pbfearme/lara_fabian_fansites_ring/lara_fabian_logo2.jpg,http://iv1.lisimg.com/image/2541599/600full-lara-fabian.jpg,http://images2.fanpop.com/image/photos/11000000/Lara-Fabian-lara-fabian-11076146-388-449.jpg,http://www4.pictures.zimbio.com/gi/Lara%252BFabian%252BSidaction%252BGala%252BDinner%252B2013%252BPhotocall%252BVy9ebM4Mwqul.jpg,http://img1.closermag.fr/var/closermag/storage/images/media/images-des-contenus/tele/news-tele/2013-07-27-the-best-tf1-estelle-denis-a-t-elle-ete-a-la-hauteur/lara-fabian/1535177-1-fre-FR/Lara-Fabian_exact810x609_l.jpg,http://esctodaygdd.s3.amazonaws.com/wp-content/uploads/2013/03/lara-fabian-mademoiselle-zhivago-illustration.jpg,http://www.evous.fr/local/cache-vignettes/L610xH348/Lara_Fabian_concert_Paris-52f4a.jpg,http://www.1001actus.com/wp-content/lara-fabian.jpg,http://www.jadorelespotins.com/wp-content/uploads/lara-fabian-sourde.jpg,http://www.stars-portraits.com/img/portraits/stars/l/lara-fabian/lara-fabian-by-mitsou%255B33085%255D.jpg,http://www.qnm.it/bellezze/cantanti_straniere/lara_fabian/lara_fabian_e5554fsd483.jpg,http://max-pix.com/data/media/4305/Lara_Fabian_07_02.jpg,http://www.icelebz.com/celebs/lara_fabian/images/photo21.jpg,http://imalbum.aufeminin.com/album/D20070203/260258_2C5KJ2NXVT6DUIOIPBECYSHO847FFQ_lara_fabian_carrere_big_H203514_L.jpg,http://www.celebirony.com/foto/cantanti/Lara_Fabian/lara_fabian_grande3.jpg,http://favimages.net/wp-content/uploads/2013/06/lara-fabian-celebrity-singer-artist-hairstyle.jpg,http://img213.imageshack.us/img213/9208/1291542076lfikmz.jpg,http://news.jukebo.fr/files/2010/10/larafabian.jpg,http://images2.fanpop.com/image/photos/11000000/Lara-Fabian-lara-fabian-11076426-800-600.jpg,http://max-pix.com/data/media/4305/Lara_Fabian_10_02.jpg,http://media.paperblog.fr/i/348/3487513/lara-fabian-devoile-nouvelle-chanson-anglais-L-1.jpeg,http://www.xpautographs.com/7461-3817-thickbox/lara-fabian-autograph.jpg,http://ecx.images-amazon.com/images/I/61uL8VVrvQL.jpg,http://www.inrumor.com/wp-content/uploads/2013/08/lara-fabian-no-makeup-460x453.png,http://images.lpcdn.ca/435x290/201009/07/197920-lara-fabian.jpg,http://userserve-ak.last.fm/serve/500/65719642/Lara%252BFabian%252BPNG.png,http://fc09.deviantart.net/fs71/f/2013/208/c/1/lara_fabian_by_jojemo-d6fibvq.jpg,http://lyricsmusic.name/img/photos/a1061lara-fabian.jpg,http://img.mypopulars.com/images/lara-fabian/Lara-Fabian-55.jpg,http://iv1.lisimg.com/image/81282/600full-lara-fabian.jpg,http://imstars.aufeminin.com/stars/fan/lara-fabian/lara-fabian-20071111-336882.jpg,http://max-pix.com/data/media/4306/Lara_Fabian_02_03.jpg,http://img2.bdbphotos.com/images/orig/u/t/utuxgno2r34jxunj.jpg%253Fkj8as6ye,http://www.inyourpocket.com/gallery/103002.jpg,http://www.kboing.com.br/fotos/imagens/5032426b2d114.jpg,http://eil.com/images/main/Lara-Fabian-Givin-Up-On-You-166669.jpg,http://upload.wikimedia.org/wikipedia/en/d/df/A_Wonderful_Life_album_cover.jpg,http://images2.fanpop.com/image/photos/11000000/Lara-Fabian-lara-fabian-11076135-350-517.jpg,http://max-pix.com/data/media/4305/Lara_Fabian_01_02.jpg,http://fc05.deviantart.net/fs71/f/2013/218/c/4/lara_fabian_by_jojemo-d6gzfa9.jpg,http://www.ndf.fr/files/2013/07/lara-fabian.jpg,http://i.ytimg.com/vi/wlM3XLupWBQ/hqdefault.jpg,http://static1.purepeople.com/articles/6/32/18/6/%2540/221813-lara-fabian-637x0-1.jpg,http://static1.purepeople.com/articles/6/41/72/6/%2540/296774-lara-fabian-637x0-3.jpg,http://static1.purefans.com/items/7/47/37/57/%2540/473757-lara-fabian-au-barbara-show-sur-star-tv-fullscreen-1.PNG,http://i1.ytimg.com/vi/jKtNuLG5jAo/hqdefault.jpg,http://images2.fanpop.com/image/photos/11000000/Lara-Fabian-lara-fabian-11076440-800-600.jpg]http://upload.wikimedia.org/wikipedia/comm...440-800-600.jpg[/url]
[18:20:07] Thumbs: 100
[18:20:07] Thumbs: HTTP: [url=http://upload.wikimedia.org/wikipedia/commons/6/69/Lara_Fabian_2012.jpg]http://upload.wikimedia.org/wikipedia/comm...Fabian_2012.jpg[/url]
[18:20:07] Thumbs: cscript //nologo "C:\Users\laptop\AppData\Roaming\foobar2000\bio_photos.vbs" "http://upload.wikimedia.org/wikipedia/commons/6/69/Lara_Fabian_2012.jpg" "C:\Users\laptop\AppData\Roaming\foobar2000\Artist_info\Lara Fabian\Lara Fabian_0.jpg"
[18:20:12] Thumbs: HTTP: [url=http://images.uulyrics.com/cover/l/lara-fabian/album-lara-fabian.jpg]http://images.uulyrics.com/cover/l/lara-fa...lara-fabian.jpg[/url]
[18:20:12] Thumbs: cscript //nologo "C:\Users\laptop\AppData\Roaming\foobar2000\bio_photos.vbs" "http://images.uulyrics.com/cover/l/lara-fabian/album-lara-fabian.jpg" "C:\Users\laptop\AppData\Roaming\foobar2000\Artist_info\Lara Fabian\Lara Fabian_2.jpg"
[18:20:14] Thumbs: HTTP: [url=http://img3.closermag.fr/var/closermag/storage/images/actu-people/bio-de-stars/lara-fabian/815034-1-fre-FR/Lara-Fabian_exact442x442_l.jpg]http://img3.closermag.fr/var/closermag/sto...ct442x442_l.jpg[/url]
[18:20:14] Thumbs: cscript //nologo "C:\Users\laptop\AppData\Roaming\foobar2000\bio_photos.vbs" "http://img3.closermag.fr/var/closermag/storage/images/actu-people/bio-de-stars/lara-fabian/815034-1-fre-FR/Lara-Fabian_exact442x442_l.jpg" "C:\Users\laptop\AppData\Roaming\foobar2000\Artist_info\Lara Fabian\Lara Fabian_3.jpg"

WSH Panel Mod script discussion/help

Reply #3499
i found the problem - it's because i'm on XP running IE8. if i spoof the user agent to a newer browser, it works.

old code:

Code: [Select]
this.xmlhttp.open(...);
this.xmlhttp.send();


fixed code:

Code: [Select]
this.xmlhttp.open(...);
this.xmlhttp.setRequestHeader("User-Agent", "Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0;  rv:11.0) like Gecko");
this.xmlhttp.send();