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 1400259 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WSH Panel Mod script discussion/help

Reply #2450
Maybe it's been already asked but...why not to add by default Wiki and Google to the Web Links?
I have the right images that match the style of other web link's buttons if needed

WSH Panel Mod script discussion/help

Reply #2451
i already have the google image from the same icon pack i got most of the others from. let's see your wikipedia image.

WSH Panel Mod script discussion/help

Reply #2452
i already have the google image from the same icon pack i got most of the others from. let's see your wikipedia image.


I saw you do have wiki in the small web links script so i thought it would be nice to have it also in the standard web links script.
I have these two png that i think could match the style of other buttons:

and

You can download them from this zip
https://mega.co.nz/#!xxAxXYza!Ixfqq...eaX_q-Hz7XPs4aQ

WSH Panel Mod script discussion/help

Reply #2453
I saw you do have wiki in the small web links script


it's much easier to get those. i simply use favicons from the websites.

with the larger web links they really need to be the same style for it not to look horrible. i'll see if the image you provided fits.

WSH Panel Mod script discussion/help

Reply #2454
I saw you do have wiki in the small web links script


it's much easier to get those. i simply use favicons from the websites.

with the larger web links they really need to be the same style for it not to look horrible. i'll see if the image you provided fits.


Ok, it was just an idea of course.
I did a quick test and my images do look like this between the other buttons, maybe they need a small roundings on the corners?

WSH Panel Mod script discussion/help

Reply #2455
i'm useless at editing images so i've just added the google one for now because the image is from the same pack.

a full download is required because of changes to files and new images: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip

files changed / added:
Code: [Select]
marc2003\common7.js
marc2003\images\google.png
marc2003\images\google_h.png
samples\web links.txt




WSH Panel Mod script discussion/help

Reply #2456
I'm not a graphic but i tried to edit them better, i think the result is quite good but maybe we do have different standards
Normal:

WSH Panel Mod script discussion/help

Reply #2457
marc, another question. Is there a way I can enable click and drag for the text panels?

WSH Panel Mod script discussion/help

Reply #2458
not easily. i couldn't even think how to implement it so i searched the thread and found T.P Wang has a draggable text example bundled with the component. i also found you were asking about it 3 years ago.

but the way mine handles scrolling/layout/calculation of text height is completely different and it would require some major changes to the way mine works. i admit it would be nice to have and i may consider it sometime.

WSH Panel Mod script discussion/help

Reply #2459
samples updated: i just noticed my last.fm charts wasn't updating automatically. my own stupid fault again.

existing users: right click>Update script
full download: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...h/changelog.txt

files changed:
Code: [Select]
marc2003\common7.js


@icedtea, i tried implementing drag in text scripts but i failed miserably. it's beyond me at the moment.

WSH Panel Mod script discussion/help

Reply #2460
marc2003

The context menu for my "enhanced spectrogram visualization" panel has a bug; it will crash if I right click on it when there is no active track (i.e. playback is stopped).
Console error reports "Object required" at Line 102

Here is the code (Line 102 error is in red):
Quote
function on_mouse_rbtn_up(x, y) {
    metadb = fb.GetNowPlaying();
    var path_to_spek = fb.ProfilePath + "addons\\wsh-enhanced-fb2k-spectrogram\\spek.exe";
    var path_to_active_track = metadb.Path;
    _menu = window.CreatePopupMenu();
    _menu.AppendMenuItem(fso.FileExists(path_to_spek) ? MF_STRING : MF_GRAYED, 1,  "Analyze active track with SPEK");
    _menu.AppendMenuSeparator();
    _menu.AppendMenuItem(MF_STRING, 2,  "Configure");
    idx = _menu.TrackPopupMenu(x, y);
    if (idx == 1) try {
        WshShell.Run("\"" + path_to_spek + "\" \"" + path_to_active_track + "\"");       
        }           
        catch(e) { }
    if (idx == 2) window.ShowConfigure();
    _menu.Dispose();
    return true;
}

How do I change that line in red to stop the crash from happening?
Thanks.

WSH Panel Mod script discussion/help

Reply #2461
Code: [Select]
var path_to_active_track = metadb ? metadb.Path : "";

WSH Panel Mod script discussion/help

Reply #2462
Try this:

Code: [Select]
function on_mouse_rbtn_up(x, y)
{
    metadb = fb.GetNowPlaying();
    if (!metadb) return;
    var path_to_spek = fb.ProfilePath + "addons\\wsh-enhanced-fb2k-spectrogram\\spek.exe";
    var path_to_active_track = metadb.Path;
    _menu = window.CreatePopupMenu();
    _menu.AppendMenuItem(fso.FileExists(path_to_spek) ? MF_STRING : MF_GRAYED, 1, "Analyze active track with SPEK");
    _menu.AppendMenuSeparator();
    _menu.AppendMenuItem(MF_STRING, 2, "Configure");
    idx = _menu.TrackPopupMenu(x, y);
    if (idx == 1) try {
        WshShell.Run("\"" + path_to_spek + "\" \"" + path_to_active_track + "\"");
        }
        catch(e) { }
    if (idx == 2) window.ShowConfigure();
    _menu.Dispose();
}

WSH Panel Mod script discussion/help

Reply #2463
Righto . . . Solved! . . . Thanks for the answers guys +++++

The code also needed one more little tweak (all new edits are in red):
Quote
function on_mouse_rbtn_up(x, y) {
    metadb = fb.GetNowPlaying();
    var path_to_spek = fb.ProfilePath + "addons\\wsh-enhanced-fb2k-spectrogram\\spek.exe";
    var path_to_active_track = metadb ? metadb.Path : "";
    _menu = window.CreatePopupMenu();
    _menu.AppendMenuItem(fso.FileExists(path_to_spek) && metadb ? MF_STRING : MF_GRAYED, 1,  "Analyze active track with SPEK");
    _menu.AppendMenuSeparator();
    _menu.AppendMenuItem(MF_STRING, 2,  "Configure");
    idx = _menu.TrackPopupMenu(x, y);
    if (idx == 1) try {
        WshShell.Run("\"" + path_to_spek + "\" \"" + path_to_active_track + "\"");       
        }           
        catch(e) { }
    if (idx == 2) window.ShowConfigure();
    _menu.Dispose();
    return true;
}

WSH Panel Mod script discussion/help

Reply #2464
Hi

This is the error that I get when I try the themed seekbar

Code: [Select]
WSH Panel Mod (Themed Seekbar by marc2003): Parsing file "C:\Users\Aldem\AppData\Roaming\foobar2000\marc2003\common7.js"
Error: WSH Panel Mod (Themed Seekbar by marc2003): Erreur d'exécution Microsoft JScript:
'this.themed_header' a la valeur Null ou n'est pas un objet
File: C:\Users\Aldem\AppData\Roaming\foobar2000\marc2003\common7.js
Ln: 986, Col: 6
<source text only available at compile time>


I'm using Foobar2000 on Windows 7 - 32 Bits

Thanks

WSH Panel Mod script discussion/help

Reply #2465
it works on any theme apart from windows classic. i guess that is your issue.

WSH Panel Mod script discussion/help

Reply #2466
You were right, thanks for the tip and for the good work !

WSH Panel Mod script discussion/help

Reply #2467
marc why did you take out the option to select a different language in the biography context menu?
I've got a couple of people asking how to do it.

WSH Panel Mod script discussion/help

Reply #2468
that change was made sometime ago and i put this note in the panel to explain why:

Quote
//due to recent changes at Last.fm which truncate the artist bio to just
//300 characters, this script now uses an alternate source for the bio.
//it's English only and there is no support for other languages.


last.fm announcement: http://www.last.fm/group/Last.fm+Web+Servi...21604/_/2201974
old screenshot showing the difference: https://dl.dropboxusercontent.com/u/2280132...20new%20bio.png

WSH Panel Mod script discussion/help

Reply #2469
Stupid last.fm, oh well I have to agree with the decision.

WSH Panel Mod script discussion/help

Reply #2470
samples updated. i made a quite a serious **** up about a week ago but no one has reported any problems. i won't mention what i did but this fixes it.

i also updated my last.fm & wikipedia biography script. when in wikipedia mode, i've tidied up the text by removing where it says edit: on some section headers.

existing users: right click>Update script
full download: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...h/changelog.txt

files changed:
Code: [Select]
marc2003\common7.js

WSH Panel Mod script discussion/help

Reply #2471
Is it possible to do multiline tooltips? If yes, how exactly?

WSH Panel Mod script discussion/help

Reply #2472
i don't think so.

WSH Panel Mod script discussion/help

Reply #2473
I have a simple question.
I don't want to see the id 3 (Artwork id 3 Icon)
how must I modify the mouse wheel function?
I don't get it...

Code: [Select]

function on_mouse_wheel(delta) {
    id -= delta;
    if (id < 0) id = 4;
    if (id > 4) id = 0;
    window.SetProperty("id", id);
    update_image();
}

WSH Panel Mod script discussion/help

Reply #2474
Code: [Select]
function on_mouse_wheel(delta) {
    id -= delta;
    if (id == 3) id -= delta;
    if (id < 0) id = 4;
    if (id > 4) id = 0;
    window.SetProperty("id", id);
    update_image();
}