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 1409687 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

WSH Panel Mod script discussion/help

Reply #725
if a user has proxy settings set in IE, couldn't you read it from the registry using WshShell.RegRead?

WSH Panel Mod script discussion/help

Reply #726
Does anyone have a good Last.fm love track script, one that doesn't require that SoftPlaylist component? It seems doable on the API, since the scrobbler I got on my Symbian phone has it and it works smoothly.
That would be much appreciated.

WSH Panel Mod script discussion/help

Reply #727
Mine have love feature, inside playing track info panel (the actual code is inside the bio panel though). You can get them here. Beware that I will soon update the pack though, tomorrow or the day after.

@Marc: thanks will do that, but that's only half way as I can't find where to read the authentication information in case the proxy server require it.

WSH Panel Mod script discussion/help

Reply #728
samples updated:

http://cid-649d3bfeaf541fbb.office.live.co...ide/samples.zip

just a couple of minor changes.

simple biography -added arrows to indicate when there is more content that can fit in the panel. clicking them will scroll the text but using your mouse wheel is still the best way.

similar artists - added context menu option to remove artist name from the title (i recently added my biography panel and this panel into the same tab and i thought it looked stupid having the artist name displayed twice next to each other). i also squished a little bug where clicking on a blank area below the content would launch a browser/spotify for artists that you can't see on screen.

WSH Panel Mod script discussion/help

Reply #729
samples updated. link in the above post.

new script: cd jewel case.



it displays the front cover according to your foobar display preferences. the size is fixed and it will be centered regardless of how big the panel is. background colour will be dictated by your CUI/DUI colour settings. double click the panel and it opens the image in your default viewer (or locate the music file in explorer if it's embedded)

WSH Panel Mod script discussion/help

Reply #730
Code: [Select]
WSH Panel Mod (CD Jewel Case by marc2003): Parsing file "T:\PortableApps\foobar2000 - all\\marc2003\common.js": Failed to load
Error: WSH Panel Mod (CD Jewel Case by marc2003): Microsoft JScript runtime error:
Object expected
Ln: 9, Col: 1
<source text only available in compile time>

did i miss something? i did copied your script folder...

WSH Panel Mod script discussion/help

Reply #731
edit: if you saw my previous post, ignore it.

are you absolutely sure the "marc2003" folder is in the correct place? i don't think it is....

edit2: samples updated. i just tidied up the pre-processor stuff so it doesn't display 2 backslashes in the console output like the example above.

"T:\PortableApps\foobar2000 - all\\marc2003\common.js" <<bad
"T:\PortableApps\foobar2000 - all\marc2003\common.js" << good

luckily it had no effect over it working.. 

WSH Panel Mod script discussion/help

Reply #732
ah yeah, didnt saw your previous post lol
it's working now, thanks D:

WSH Panel Mod script discussion/help

Reply #733
i've got a problem with the now playing panel in default ui

it crashes when i want to load. here is the console log:

Error: WSH Panel Mod (Now Playing by marc2003): Laufzeitfehler in Microsoft JScript: (means runtime error)
Objekt erforderlich (means object required)
Ln: 307, Col: 2
<source text only available at compile time>
WSH Panel Mod: Warning: Could not load file C:\Users\Hannes\AppData\Roaming\foobar2000\user-components\foo_uie_wsh_panel_mod\jscript.api
WSH Panel Mod: Warning: Could not load file C:\Users\Hannes\AppData\Roaming\foobar2000\user-components\foo_uie_wsh_panel_mod\interface.api

WSH Panel Mod script discussion/help

Reply #734
oops, my house cleaning of old images has come back to bite me again.

change line 119 from

Code: [Select]
scale(gr, gdi.Image(images_path + "foobar.png"), 0, 0, ww, wh - 130, "min");


to

Code: [Select]
scale(gr, gdi.Image(images_path + "new foo.png"), 0, 0, ww, wh - 130, "min");


edit: fixed version uploaded also.

WSH Panel Mod script discussion/help

Reply #735
thanks, mate


btw, what do i have to change, if i want to display the playback time and length next to the title, for example: title - 0:34/3:44 ?

would be very cool if you post the lines



WSH Panel Mod script discussion/help

Reply #738
samples updated: http://cid-649d3bfeaf541fbb.office.live.co...ide/samples.zip

lastfm charts: fix last.fm radio buttons not working after other changes made last week. 
similar artists: added option to pause playback when launching spotify.

 

WSH Panel Mod script discussion/help

Reply #740
ampersands (&) don't show in folder/file names. you can fix this by using the DT_NOPREFIX flag.

i like how you've drawn all the images in the script. nice work.

edit: using the "send found tracks to playlist and play" option doesn't appear to work?? the files get added but it doesn't play.

edit2: i've realised this is due to me setting enqueue as the default action under "shell integration" in the preferences.

WSH Panel Mod script discussion/help

Reply #741
nice one Falstaff!!
this is one feature from mediamonkey that i hope exist in foobar2k and you brought that to us, thank you!

WSH Panel Mod script discussion/help

Reply #742
ampersands (&) don't show in folder/file names. you can fix this by using the DT_NOPREFIX flag.


thanx for the reporting, i'll fix it  Edit: done

nice one Falstaff!!
this is one feature from mediamonkey that i hope exist in foobar2k and you brought that to us, thank you!


thank you

WSH Panel Mod script discussion/help

Reply #743
Hi, I have a few questions about scripting in jscript

I dont know if this is possible, but, is there a function that is called automatically when the panel starts?

Is is possible to draw a rounded rectangle that is filled with a gradient?

WSH Panel Mod script discussion/help

Reply #744
1) you can create your own function and then call it like this...

Code: [Select]
function my_func() {
//blah
}

my_func();


2) i think you'll just have to bodge it by drawing a few rounded rectangles inside each other slowly changing the colours.

WSH Panel Mod script discussion/help

Reply #745
2) there is another solution : use a round rectangle as a Mask, draw a gradient rectangle and apply the mask on it to obtain the gradient-round-rectangle wanted ...

here is a function that do the job:

Code: [Select]
function FillGradientRoundRect(gr, x, y, w, h, arc_width, arc_height, gradient_angle, bg_colour1, bg_colour2, focus) {
    // drawing the Mask
    var Mask_img = gdi.CreateImage(w+1, h+1);
    var gb = Mask_img.GetGraphics();
    gb.FillSolidRect(0,0,w,h,0xffffffff);
    gb.SetSmoothingMode(2);
    gb.FillRoundRect(0, 0, w-2, h-2, arc_width, arc_height, 0xff000000);
    Mask_img.ReleaseGraphics(gb);
    // drawing the gradient rect
    var GradientRect_img = gdi.CreateImage(w+1, h+1);
    gb = GradientRect_img.GetGraphics();
    gb.FillGradRect(0, 0, w-2, h-2, gradient_angle, bg_colour1, bg_colour2, focus);
    GradientRect_img.ReleaseGraphics(gb);
    // resizing and applying the mask
    var Mask = Mask_img.Resize(w+1, h+1);
    GradientRect_img.ApplyMask(Mask);
    Mask.Dispose();
    // drawing the resulting image
    gr.DrawImage(GradientRect_img, x, y, w-1, h-1, 0, 0, w, h, 0, 255);
}

and this is an example of call to use in on_paint:

Code: [Select]
function on_paint(gr) {
    FillGradientRoundRect(gr, 10, 10, 100, 60, 15, 15, 90, 0xffeeee22, 0xffff5533, 1.0);
}

... and the result is like this in a panel



WSH Panel Mod script discussion/help

Reply #747
Wow thanks! I'm not a coder, and just kinda bs my way through code, so I'm sure I'll be back to ask more questions about that.

Im assuming that drawing images in the manner falstaff showed is more efficient than importing a picture of the image through DrawImage() right?

WSH Panel Mod script discussion/help

Reply #748
@ marc2003, is it possible to add a scroll bar to you "simple biography" panel? removing the up and down arrows...

WSH Panel Mod script discussion/help

Reply #749
i've thought about it in the past but i'm just too lazy.    i just use my mouse wheel to scroll. i only added the arrows to indicate there is more content.

if you want proper scrollbars, you could use the full blown "biography view" component: http://foo2k.chottu.net/#bv