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

WSH Panel Mod script discussion/help

Reply #2400
just updated my discogs script. a few weeks back i didn't like all the partial matches you get so i made it show exact matches only. i've now decided to make this a toggable option that can be turned on or off.

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

WSH Panel Mod script discussion/help

Reply #2401
it's a lot more effort than you might think for me to add the front cover into all the images used in my thumbs script. how they update is fundamentally different.

either have 2 panels, or use now playing with everything turned off but the CD cover.


edit: i forgot there is already the functionality to have more than 1 folder in custom folder mode. obviously it won't download art from last.fm but if you have stuff already acquired, you can use it like this.

Code: [Select]
d:\applications\foobar2000\wsh_lastfm\$crc32(%artist%)|$directory_path(%path%)

note each folder is separated by a | with no spaces. the first uses my art downloaded from last.fm. you'd have to modify the path to your foobar profile folder. the 2nd path is the folder containing the playing/selected track.

example of front cover added to artist images: https://dl.dropboxusercontent.com/u/2280132...%2B%20cover.png

You're right I checked the scripts, that's a shame. I wish the now playing cover didn't have a limit so it could be made big enough to fit the panel. I guess I'll use two panels, gives me a reason to use the buttons I spent ages creating but ended up not needing. I'll try the custom folder mode not a bad solution for me.


Which do you prefer discogs or musicbrainz? I prefer having exact artist match or this happens http://img16.imageshack.us/img16/4996/discogsv.jpg

WSH Panel Mod script discussion/help

Reply #2402
i much prefer musicbrainz for the cleaner output. but i have both active because there can be differences. i have all mine in tabs so it's no effort to hide them out of the way most of the time.



WSH Panel Mod script discussion/help

Reply #2403
Yeah me too and musicbrainz gets more of the obscure artists nearly everytime, I use panel stack splitters to slide panels in and out. I still get this crash in musicbrainz though:

Error: WSH Panel Mod (Musicbrainz by marc2003): JavaScript runtime error:
Out of stack space
File: C:\Users\Nate\AppData\Roaming\foobar2000\marc2003\common7.js
Ln: 2332, Col: 4
<source text only available at compile time>

I'm trying to workout what is causing it, it was happening randomly not very often. Some songs it crashed on I couldn't reproduce with the same song. Then I noticed it crashes with ELPlaylist when selecting multiple songs, if I try and make it crash by drag selecting say five songs fast up and down it crashes every time. I've put it to prefer now playing which seems to have fixed the problem.

I also get this crash in now playing:

Error: WSH Panel Mod (Now Playing by marc2003): JavaScript runtime error:
Overflow
File: <main>
Ln: 77, Col: 2
<source text only available at compile time>

This happens when I reduce the panel to size 0, sometimes I don't want to show the panel so I slide it up and close it, this crashes it, I know you said you fixed this but it still crashes on Windows 8 using Jscript9, (it doesn't crash using Jscript though). I think it was you or Brett who said use Jscript9, on Windows 8 due to high cpu bug?

Edit* Just tested it on jscript and it's much faster than jscript9, that was giving 10-15% cpu usage just moving the mouse over it, now with jscript it's hitting 1% max. So which should be used jscript or j9 for win8?

Edit* It's the same on all your scripts, much much faster in jscript, I had them running jscript9 all this time because bretts wsh playlist needs j9 for windows 8. 

WSH Panel Mod script discussion/help

Reply #2404
Quote
This happens when I reduce the panel to size 0


well don't do it then. you can achieve the same effect by hiding panels instead.

the windows 8/jscript9 thing has been reported before in the main component thread. i guess i should update my readme telling windows 8 users not to use it.

http://www.hydrogenaudio.org/forums/index....st&p=816938

it's nothing to do with any script - it's the function that detects mouse movement that is problematic.

WSH Panel Mod script discussion/help

Reply #2405
I don't like hiding panels, I like having freedom to resize them with the mouse, to be able to move the layout around.
Are you using Windows 8 Marc because I've just tested this on your panels. Using jscript and moving the mouse around is doing nothing to the cpu in task manager, it's at 0-1% never goes higher. Using Jscript9 eats upto 15% CPU. This was the opposite using bretts wsh playlist.

I know it's not your scripts as it does it even with an empty WSH panel.

Also jscript has fixed that panel size 0 crash, it's all good .

WSH Panel Mod script discussion/help

Reply #2406
no, i don't use windows 8 which is why i posted a link to someone else reporting that problem.

i've never told anyone to use jscript9. new panels always default to using jscript.

WSH Panel Mod script discussion/help

Reply #2407
So you're right. Is this reported often because I don't think it's a problem with Windows 8, at least not mine. To me it is the opposite, I think it would be a bad move to tell W8 users not to use it.

Now I remember it was hunter who told me about J9.

Quote
~eXtremeHunter1972 Apr 27, 2013
"on mouse move high CPU"

I assume you are on windows 8? if so then right click while holding shift key on playlist and select WSH configure and
on left top Script Engine select jscript (other people who have installed Internet explorer 9 should select jscript9).
This is known bug on WSH panel but so far not fixed.


Weird as it's the opposite of what he said for me, I'll have to test on some other Windows 8 machines.

WSH Panel Mod script discussion/help

Reply #2408
your post might as well be written in japanese for all the sense it makes to me.

WSH Panel Mod script discussion/help

Reply #2409
lmao, basically Jscript9 sucks on Windows 8, people told me to use it though, which I'm not now.

Marc musicbrainz is still crashing 

Quote
Error: WSH Panel Mod (Musicbrainz by marc2003): Microsoft JScript compilation error:
Unterminated string constant
File: C:\Users\Nate\AppData\Roaming\foobar2000\marc2003\common7.js
Ln: 2297, Col: 7
<source text only available at compile time>
Musicbrainz: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
  <head>
    <title>502 Bad Gateway</title>
    <link rel="stylesheet" href="/.proxy/httperror.css" type="text/css" />
  </head>
  <body>
    <div id="bg">
      <img src="/.proxy/MusicBrainzLogo-Q.png" />
    </div>
    <h1>Server being naughty</h1>
    <p>One of our servers appears to be misbehaving.&nbsp; Please try again later.</p>
    <p id="http">502 Bad Gateway</p>
  </body>
</html>


*Edit I guess that's not your script, it's their server. Ignore this.

WSH Panel Mod script discussion/help

Reply #2410
the script shouldn't crash because of the dodgy server response. i've just updated it to fix that.

WSH Panel Mod script discussion/help

Reply #2411
Damn you're quick on fixes, it's not crashed at all since the fix, cheers dude
What are you working on at the moment? A VU meter by any chance?

WSH Panel Mod script discussion/help

Reply #2412
Got a link request, it's a must have for guitar players.

Code: [Select]
http://www.ultimate-guitar.com/search.php?value=$replace(%artist%, ,+)&search_type=band

WSH Panel Mod script discussion/help

Reply #2413
Bratman


Maybe you didn't understand me or i explained poorly, if you are on windows 8 DON'T use jscript9, if you are on xp or vista or seven and you have installed internet explorer 9 then use jscript9.
Windows 8 uses jscript10 engine and thats why there is some complications when jscript9 is enabled on your machine.

T.P. Wang has written:

v1.5.0 Beta 1
- ADD: Add support for new JScript engine (aka "Chakra") from IE9.
      In order to get it work, select "JScript9" from the script editior, and ensure the IE9 is installled, or it will fallback to the default JScript engine.

WSH Panel Mod script discussion/help

Reply #2414
Are there any advantages to using JScript9 over the default JScript?

WSH Panel Mod script discussion/help

Reply #2415
Wikipedia Jscript9

Test it on your machine with this script, in my old core2duo with jscript9 calculation takes 25 ms with jscript it takes 349 ms.

Code: [Select]
function on_paint(gr) {

    var from = new Date();

    for (var i = 0; i < 1000000; i++) {

        var result = Math.sqrt(i);

    }

    var to = new Date();

    gr.SetTextRenderingHint(5);
    gr.DrawString("Calculation took: " + (to - from) + "ms", gdi.font("Segoe Ui", 20, 0), 0xFF000000, 30, 30, 1000, 30);

}

WSH Panel Mod script discussion/help

Reply #2416
jscript9 certainly looks far faster performing 1 million calculations like that but have you tested your own scripts? i just tested a few of my own and it's far less conclusive. i even have jscript consistently beating jscript9 in a few of them (to be fair, the difference is less than 10ms). 

of course the most expensive operation in WSH panel mod is the display and it's not going to help with that at all.

WSH Panel Mod script discussion/help

Reply #2417
It's faster in WSH playlist initialization when there is some 50000 tracks to init,

but most of the time the difference is negligible and I personally don't bother to switch  jscript9.

WSH Panel Mod script discussion/help

Reply #2418
Wanted to edit my last post.
Ehh we really need option to delete post!
Delete me please.

WSH Panel Mod script discussion/help

Reply #2419
i just added 13 of my own panels plus falstaff's WSH playlist to a default UI layout and restarted foobar 5 times for each test. these are the startup times reported in the console.

jscript
Code: [Select]
0:00.485566
0:00.476765
0:00.485435
0:00.497912
0:00.485515


jscript9
Code: [Select]
0:00.591191
0:00.588813
0:00.605242
0:00.596497
0:00.591015


although the difference is small, it's certainly consistent. this was on windows 7 x64 with IE9 installed.

WSH Panel Mod script discussion/help

Reply #2420
Hunter, reading your comment again makes sense now, my bad.
I tested the calculation script and I get 25ms in jscript9 compared to 145ms in jscript.
When I am using Marcs scripts, I get high cpu usage moving the mouse cursor over them with jscript9.
So jscript9 IS faster but the downside is it lags with mouse activity?
But then Marcs last reply proves jscript9 is slower (at least with his scripts) , I'm a BIT confused. 

WSH Panel Mod script discussion/help

Reply #2421
Quote
When I am using Marcs scripts, I get high cpu usage moving the mouse cursor over them with jscript9.


like i said before, it has nothing to do with my, or anyone else's scripts. it's a problem with the component. you can verify this yourself by adding a blank panel and adding only this code to it. close the dialog and move your mouse over it.

Code: [Select]
function on_mouse_move(x,y) {}


Quote
So jscript9 IS faster but the downside is it lags with mouse activity?


jscript9 is faster at pure number crunching. that snippet extremehunter posted has it performing a million calculations and it certainly looks far superior doing that one task.

but i've found that in real world usage - at least using my scripts - it's slower.

WSH Panel Mod script discussion/help

Reply #2422
a little update:

Code: [Select]
7.2013-05-13.01

"Discogs". As discogs uses something like $swapprefix, this
script needs to use it if the "exact artist match" option is
enabled. Also, the output has been tidied up by removing
all extraneous spaces.


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 #2423
Your scripts are faster in Jscript though, it might depend on the script because sometimes jscript9 is faster on certain scripts. Maybe that is wrong, it's just what I've seen.
I'll just use Jscript I agree it's faster in real world usage.

Musicbrainz has been crashing again on me, a new error.

Quote
Error: WSH Panel Mod (Musicbrainz by marc2003): Microsoft JScript runtime error:
'this.data.length' is null or not an object
File: C:\Users\Nate\AppData\Roaming\foobar2000\marc2003\common7.js
Ln: 2107, Col: 21
<source text only available at compile time>


Somethings up with the code, it's not working at all even after pasting in from samples.

*nvm, your latest dropbox sample rar has fixed it.

WSH Panel Mod script discussion/help

Reply #2424
I have created a context menu item to open the now playing track in an external spectrum analyzer program (SPEK.EXE)
But it does not work . . . SPEK opens with a blank interface but does not load the track (i.e. the file path)

Why ???? . . . this program accepts basic commands like spek.exe [file] , therefore it should work.



Here is the context menu function in the script:
Code: [Select]
function on_mouse_rbtn_up(x, y) {
    metadb = fb.GetNowPlaying();
    _menu = window.CreatePopupMenu();
    _menu.AppendMenuItem(MF_STRING, 1,  "Open active track with SPEK");
    _menu.AppendMenuSeparator();
    _menu.AppendMenuItem(MF_STRING, 2,  "Configure");
    idx = _menu.TrackPopupMenu(x, y);
    if (idx == 1) try {
        var path_to_target_file = metadb.Path;
        WshShell.Run(fb.ProfilePath + "addons\\wsh-enhanced-fb2k-spectrogram\\spek.exe" + "path_to_target_file");
        }
        catch(e) { }
    if (idx == 2) window.ShowConfigure();
    _menu.Dispose();
    return true;
}