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

WSH Panel Mod script discussion/help

Reply #3200
@matav @marc2003 Just a little info.
I have foobar2000 1.2.9 (copied from existing portable Windoze install) with marc's wsh scripts running in wine 1.6.2 (winxp 32bit prefix) on Linux Mint 17 KDE 64bit. After commenting out these offending lines in common7.js:
Code: [Select]
//var vb = new ActiveXObject("ScriptControl");
//vb.Language = "VBScript";

they basically work except for downloading images from last.fm and the allmusic scripts. I have no problem with marc's last.fm playcount sync.

fake ie6 (default in wine), installed wmplite (for playing wma files).
winetricks:
gdiplus_winxp
wsh57
vb6run
corefonts

I've tried using ie8, but after installing ALL of my images will not display except for album art in DUI IIRC.

WSH Panel Mod script discussion/help

Reply #3201
i must admit, it has to be a few years since i last tried linux/wine. i know i've not tried it since 2012 because i haven't had decent internet since then. downloading an ISO would be impossible for me now.

if scripts based on my common7.js are working with only ie6 installed in wine, then obviously wine must have been updated so it supports the JSON parsing script that i include. perhaps matav can check to see if there are newer versions of winebottler available on his mac.

@tarkus721, both my last.fm images and allmusic scripts rely on this activex object...

Code: [Select]
new ActiveXObject("htmlfile");


if you can find out what dependency it needs with winetricks, it might be possible to get it working.

i also find columns UI is better under wine as it doesn't have as many re-draw glitches as default ui. this also might be why installing ie8 didn't cause me any problems??

WSH Panel Mod script discussion/help

Reply #3202
if scripts based on my common7.js are working with only ie6 installed in wine, then obviously wine must have been updated so it supports the JSON parsing script that i include. perhaps matav can check to see if there are newer versions of winebottler available on his mac.

Apparently as the last.fm/wikipedia bio panel works flawlessly. The thumbs panel can display images already present in foobar2000/wsh_lastfm directory or in the custom folder, but not download them (crash: line1701: col18: new ActiveXObject ("htmlfile")). There's another wsh panel error in wine I've banged my head against a wall for: "file already exists".

Quote
i also find columns UI is better under wine as it doesn't have as many re-draw glitches as default ui. this also might be why installing ie8 didn't cause me any problems??

I'm using cui with a modded config by eXtremeHunter1972 (CaTRox). If I add ie8, there goes all of my images (wsh, esplaylist, elplaylist, simpleplaylist etc). I may try a new wine prefix to test it out.

Quote
i must admit, it has to be a few years since i last tried linux/wine. i know i've not tried it since 2012 because i haven't had decent internet since then. downloading an ISO would be impossible for me now. tongue.gif

If I may suggest; find a friend or neighbor that does have a fast connection, bring a usb stick and download that sucker...

 

WSH Panel Mod script discussion/help

Reply #3203
...
I have no problem with marc's last.fm playcount sync.

fake ie6 (default in wine), installed wmplite (for playing wma files).
winetricks:
gdiplus_winxp
wsh57
vb6run
corefonts
Thanks!!! Got it working with just gdiplus_winxp, wsh57, msxml3 alongwith the following script modifications in common4:
Code: [Select]
//var doc = new ActiveXObject("htmlfile");
//var vb = new ActiveXObject("ScriptControl");
//vb.Language = "VBScript";

Oh... at first it gave an error when i tried to Create/Import SQL file but it worked the 2nd time.

I can love again!
\o/

@tarkus721, both my last.fm images and allmusic scripts rely on this activex object...
Code: [Select]
new ActiveXObject("htmlfile");
if you can find out what dependency it needs with winetricks, it might be possible to get it working.
As per my observation, ie6 or alike is needed.

But in my case, if i select ie6 then wsh57 goes bonkers so now I retried with with gdiplus_winxp, msxml3, wsh56js & ie6 and:
Code: [Select]
//var vb = new ActiveXObject("ScriptControl");
//vb.Language = "VBScript";
Everything is back in business!

Weird, i bet i had tried this set but maybe the script modifications were incomplete that time.
Anyways, am so glad it all works now


----
Do note that I am definitely using common4 and not common7 and it seems I absolutely need the msxml3 winetrick on my Mac.

WSH Panel Mod script discussion/help

Reply #3204
... in my case, if i select ie6 then wsh57 goes bonkers so now I retried with with gdiplus_winxp, msxml3, wsh56js & ie6 and:
Code: [Select]
//var vb = new ActiveXObject("ScriptControl");
//vb.Language = "VBScript";
Everything is back in business.

Weird, i bet i had tried this set but maybe the script modifications were incomplete that time.

@marc2003, in retrospect, the wininet winetrick was causing that JSON exception else we had it nailed then!


EDIT:
Actually, I reverted to wsh57 + gdiplus_winxp + msxml3 winetricks set because ie6 really screws up things. It somehow hinders the "Create and Import SQL file" process
:/
*sigh* i'd rather take my chances with
Code: [Select]
//var doc = new ActiveXObject("htmlfile");


----
Seems like the set of winetricks that work on a Linux don't necessarily work the same on a Mac.

WSH Panel Mod script discussion/help

Reply #3205
so i've been providing bad advice all round. woops. 

my scripts have new system requirements: WINDOWS. 

glad you got there in the end though...


WSH Panel Mod script discussion/help

Reply #3207
i prefer experimenting with CIDER. and no, it's not a computer related term or acronym.

WSH Panel Mod script discussion/help

Reply #3208
OMG, i found a bug and squished it. this is for anyone who uses the musicbrainz script.

right click panel>Update script. restart foobar when prompted.
full download here: 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


Code: [Select]
7.2014-10-12.01

"Musicbrainz". A change to the MB webservices broke the artist lookup feature (for when
files are not tagged with a musicbrainz artist id). This has now been fixed.

WSH Panel Mod script discussion/help

Reply #3209
wsh_stream (wsh panel internet radio add-on for foobar2000/marc2003 scripts)

New Version now includes:

  • Station art
  • Artists art force update on dynamic title changes.
  • tunein web services
  • shoutcast api services (devid not included)
  • station info
  • station recording
  • folder sizes




Installation:

https://www.dropbox.com/s/jj510019d3v5g68/w...stream.rar?dl=0



Thanks to marc2003 for his scripts & to Rolisoft for their web services.


WSH Panel Mod script discussion/help

Reply #3210
i just pushed out another tiny update. this time i've added a DURATION field to my Properties script. i'm sure most people have their playlist and status bar configured to show this value but it didn't seem right that it was missing from my panel.

existing users can right click>Update script.
full download here: 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 #3211
ooh another update. i actually have no idea how long it's been broken but i've noticed the myspace button in my Web links script does not work anymore. i can't even fix it because it looks like myspace are not giving away the link to search results. the button has now been removed.

this requires updating the script in the panel manually: https://dl.dropboxusercontent.com/u/2280132...web%20links.txt
full download here: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip

files changed:
Code: [Select]
samples\web links.txt

WSH Panel Mod script discussion/help

Reply #3212
a couple more updates 

existing users can right click>Update script.
full download here: 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


Code: [Select]
7.2014-10-17.01

"Last.fm Charts". New "Font size" option in previous update truncates some text if
font is changed to largest size. This update should fix it.

7.2014-10-16.02

"Autoplaylists", "Musicbrainz", "Last.fm Similar artists", "Last.fm Charts",
"Properties". Add new "Font size" option to the right click menu.


please report any appearance bugs as i'm too lazy to check all scripts/settings.

WSH Panel Mod script discussion/help

Reply #3213
Is there a way to merge the simple seekbar into your themed toolbar buttons script, marc2003?

Image below shows current settings. Would like to get the seekbar from where it is now (red arrow) to somewhere between the buttons (blue arrows and defined location - centered top to bottom w/equal spaces at the ends). My attempts have all ended in failure. Not sure it is even possible with the scripts provided so figured I'd ask before continuing on.


Image.


WSH Panel Mod script discussion/help

Reply #3215
i had just had to re-upload the above script because there was a silly re-drawing glitch in it - just a few minutes too late to edit the post... 

WSH Panel Mod script discussion/help

Reply #3216
look at the comments for how to customise colours/placement/size.


Remind me to buy you a beer if you're ever in the neighborhood. 

Thank you. Works wonderfully.

WSH Panel Mod script discussion/help

Reply #3217
The new capabilities work well based on a few hours of play. marc2003, many thanks for your extremely useful scripts, diligence in maintaining and improving them and lots of scripting help for other scripts.

WSH Panel Mod script discussion/help

Reply #3218
Hello guys, I've got some issue with one of my scripts and I don't seem to be able to solve it on my own...

The problem is with my control bar script at the bottom which normally functions well and doesn't produce any errors but if I start skipping through tracks rapidly (like 10 tracks in a row or so) the script sort of hangs and (which is even more weird) prevents other scripts (like album art) from updating. Another strange thing is that the buttons (on the bar itself), seek bar and even timers keep functioning as they normally are. If I restart the script (configure -> apply) everything fixes and other scripts start working properly again.

I'll provide latest version of my UI for testing:
https://www.dropbox.com/s/by322bn3m0nurkm/S...-beta1.zip?dl=0

the script in question is located in themes\strigUI\scripts\WSH_ControlBar.js

This issue must be somehow connected to on_playback_starting or on_playback_new_track callbacks since it only happens when I skip through tracks rapidly, but I'm not sure...

And it's also worth a note that if I disable that bar and skip through tracks in the same manner - nothing fails, so the problem must be somewhere here.

I know it could be too much to ask (skimming through someone's code), but i'm kinda lost on this one, so any assistance would be appreciated.

WSH Panel Mod script discussion/help

Reply #3219
ha, i just tried it and it is hilariously awful. it certainly makes me feel a whole lot better about some of the hack jobs i share. 

looking at task manager, i'm seeing 40% cpu usage for well over half a minute. at that point i closed it because i had no idea how much longer it was going to be. 

i always try and keep an eye on resource usage so nothing like this happens. yes i've made mistakes and i've occasionally posted some bad updates but nothing quite on this scale. 

my guess it's something timer related. really there is no need to be killing them and re-creating. just create one and leave it running. this has no impact on resources so long as you're not doing anything stupid with them.

WSH Panel Mod script discussion/help

Reply #3220
my guess it's something timer related. really there is no need to be killing them and re-creating. just create one and leave it running. this has no impact on resources so long as you're not doing anything stupid with them.

Yeah, I thought about that. Though most of the scripts I checked do that (kill timers when they are not needed) so I mimicked that
Gonna see if that helps.

edit: also I wanted to ask if SetTimeout keeps 'counting' when it expires, i.e. do I need to kill it at all or not? (logic says I don't  )

WSH Panel Mod script discussion/help

Reply #3221
SetTimeout is a one time event only. you can check that out for yourself...

Code: [Select]
window.SetTimeout(function() {
    fb.trace("boo!");
}, 100);


BTW, when i said "hilariously awful" before, i was only talking about the performance issue - not the thing as a whole.   

for my seekbar scripts i just create a timer at startup and leave it alone....

Code: [Select]
window.SetInterval(function() {
    if (!fb.IsPlaying || fb.IsPaused || fb.PlaybackLength == 0) return;
    window.RepaintRect(...);
}, 150);

WSH Panel Mod script discussion/help

Reply #3222
BTW, when i said "hilariously awful" before, i was only talking about the performance issue - not the thing as a whole. 


Uh, something must be really wrong, I'm not seeing any performance issues with my setup 

What you said actually made me find my pretty ancient laptop (1,73 centrino, 1gb ram) and check it there with my entire library (35k-ish tracks on external drive) and I didn't see extensively high CPU usage, here's screenshot:

http://i.imgur.com/EWwisCh.png (first start right after connecting external hdd)

So I actually wonder what happened there... Foobar only uses high amount of CPU power when it re-scans library folders for me or when Track Info panel counts stats on large number of tracks.

WSH Panel Mod script discussion/help

Reply #3223
it seems we've crossed wires. i was talking about the specific issue you reported - when you skip a load of files at once. that's what i did to cause the excessive cpu load. like you said, when you remove that one panel, the problem goes away.

when running normally, performance seems ok.

edit: this screenshot shows what's happening on the pathetic athlon64 system i'm using. it is monitoring foobar2000 only.



the bit i've scribbled with green at the top is when the display/seekbar panel is empty
the blue bit is when i've added the code but playback is running normally (around 2-5%)
the red bit is after i've skipped several tracks in quick succession. 25-30% for well over a couple of minutes and i got bored of waiting. it is lower than the 40% i saw last night though.

edit: i've fixed the code for you... http://pastebin.com/4hZAA8CR

in this screenshot, that little 2nd spike is what happens when i skipped a load of tracks at once. after that, it immediately settles itself.




WSH Panel Mod script discussion/help

Reply #3224
marc2003
Thanks for clarifying!
Even more so thanks for the fix you provided, it seems to work pretty smooth now. I'll be more careful with timers from now on.