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

WSH Panel Mod script discussion/help

Reply #275
try my script again but remove the *.*. it already has wildcard support (but is limited to jpg/png/gif files).

Code: [Select]
E:\My Music\artists\$substr(%artist%,1,1)\%artist%_

WSH Panel Mod script discussion/help

Reply #276
Sorry marc, still no go.

Let me know if there's anything else I can do to track down the problem.

Cheers.

Alessandro

WSH Panel Mod script discussion/help

Reply #277
@mobyduck
Does your string work in artreader?
I guess your path to an artist picture is like: E:\My Music\artists\M\Michael Jackson_01.jpg
(this is what your string suggests, although you could also use $left(%artist%,1) instead $substr())

WSH Panel Mod script discussion/help

Reply #278
i see the problem now. it's because i only meant the script to use folders. if you change your pattern to

Code: [Select]
E:\My Music\artists\$substr(%artist%,1,1)


.. that should work.

but if there are other images in that folder you don't want displayed, you'll have to edit the script. remove the \\ on lines 90-92 and change your pattern back to the original. then if you want to use folders at a later time, you'll need to add a trailing slash yourself in the dialog box.


WSH Panel Mod script discussion/help

Reply #280
Does your string work in artreader?
I guess your path to an artist picture is like: E:\My Music\artists\M\Michael Jackson_01.jpg
Yeah, your guess is right. But, forgive me, what do you mean by artreader exactly?

And thanks for the $left suggestion: learning a lot today!

Alessandro

WSH Panel Mod script discussion/help

Reply #281
artreader = Preferences --> Display

WSH Panel Mod script discussion/help

Reply #282
Well, it works AFAICT, but only the first image that matches is returned.

Alessandro

Edit: that's just speculation on my part, haven't tested extensively.

WSH Panel Mod script discussion/help

Reply #283
samples updated

-added transition effect to "now playing" panel. track info and album art slide into view when playback starts
-known issue: it's not always smooth when changing artists as the script has to scan your hard disk for images
-you can toggle the effect on or off via the context menu

WSH Panel Mod script discussion/help

Reply #284
samples updated

-added transition effect to "now playing" panel. track info and album art slide into view when playback starts
-known issue: it's not always smooth when changing artists as the script has to scan your hard disk for images
-you can toggle the effect on or off via the context menu



The transition looks great! What would I need to change to make the "Now playing" panel show artist images (embedded forst)? I was looking over the code, but my lack of scripting skills clearly shows.

WSH Panel Mod script discussion/help

Reply #285
this uses the foobar artreader instead....

http://pastebin.org/114502

edit: cleaned up code a bit by removing all last.fm related stuff


WSH Panel Mod script discussion/help

Reply #287
samples updated

-added transition effect to "now playing" panel. track info and album art slide into view when playback starts
-known issue: it's not always smooth when changing artists as the script has to scan your hard disk for images
-you can toggle the effect on or off via the context menu


i have a little problem with now playing script  when i turn foobar off and on again i receive error on line 108

Code: [Select]
gr.GdiDrawText(title, g_font_title, RGB(255,255,255), text_x, wh-130, ww-text_x-40, wh,DT_END_ELLIPSIS | DT_CALCRECT | DT_NOPREFIX);


with console text "title not defined"

i suspect its some issue with script being evaluated before playback start but do not know how to resolve it

 

WSH Panel Mod script discussion/help

Reply #288
are you sure you downloaded it from the link you quoted and it's totally un-modified? it should never generate an error like that.


WSH Panel Mod script discussion/help

Reply #289
are you sure you downloaded it from the link you quoted and it's totally un-modified? it should never generate an error like that.

mmm pretty sure... but it does not generate this error everytime which kind of bugs me as its not easily redoable. just from time to time all i see instead of "now playing" is "script error"

im not sure if i translated the error msg correctly (as i dont run English windows and error is in my native lang). What is debuger trying to say is that "variable title" is not defined.

maybe something like this could help
Code: [Select]
if (!isset(title)) { title="";}

but imnot sure if something like this is possible in wshpanel[/s]

edit: Interesting think just happened and ive found out that i used previous version of now playing script... will continou explore

WSH Panel Mod script discussion/help

Reply #290
I'm currently using the Main Menu manager (All in one) script. It works fine, but I'd really like to have a button in it (right now clicking anywhere in the panel shows the menu from that point). Can anyone help me with it?

This is the script I'm talking about:
http://www.pastebin.org/116881

WSH Panel Mod script discussion/help

Reply #291
@Keesface, the on_mouse_lbtn_up function can use "x" and "y" to do just that.  Find the x and y coordinates of your button's boundaries x1, x2, y1, y2. 

This can be done easily by putting this function in your script and watching the console:
Code: [Select]
function on_mouse_move (x,y) {
   fb.trace("x: " + x);
   fb.trace("y: " + y);
}


Now, just encase the entirety of the menu command you posted within:
Code: [Select]
if(x > x1 && x < x2 && y > y1 && y < y2) {
<MENU COMMANDS>
}


That should work.  Now, the menu only comes up when you click within the specified boundaries.



WSH Panel Mod script discussion/help

Reply #294
I'm trying to add a 4th link to marc "web links" sample, i would like to add a link to rateyourmusic.com artist page or album...

i write this in the script:



but i got a link to rateyourmusic home page and not to artist page, anyone knows why?

Thanks anyway.

WSH Panel Mod script discussion/help

Reply #295
@Fractal_Mortality, you do realise that script was a modification of my samples. it requires files from the zip file linked above. perhaps you are missing that?

@joe30, no problems with the link my end. it's always been reliable for me.

@nickdc, your $replace doesn't serve any purpose. try removing it. also, if you hover your mouse over the button, a tooltip will show the actual link before you click so that should help you troubleshoot it as well.



WSH Panel Mod script discussion/help

Reply #297
@nickdc, your $replace doesn't serve any purpose. try removing it. also, if you hover your mouse over the button, a tooltip will show the actual link before you click so that should help you troubleshoot it as well.

Ok i wrote this in the script:

var rym = fb.TitleFormat("http://rateyourmusic.com/artist/$replace(%artist%, ,)").EvalWithMetadb(g_metadb);

now, when i go with mouse over the button i read
http://rateyourmusic.com/artist/JohnLennon,

but the right link on artist page on rym is:
http://rateyourmusic.com/artist/john_lennon

so i think i need to replace the caps letters with no caps, and replace the space between the words with a "_" to get the right link, do you know how to do?

WSH Panel Mod script discussion/help

Reply #298
so i think i need to replace the caps letters with no caps, and replace the space between the words with a "_" to get the right link, do you know how to do?


if thats all you want:

Code: [Select]
$lower($replace(%artist%,' ','_'))

WSH Panel Mod script discussion/help

Reply #299
Awesome cart, it works good, thanks