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

WSH Panel Mod script discussion/help

Reply #3725
ok, that's cool. i'll wait until you're done.

i have a feature suggestion and that's for the middle mouse button to toggle the playlist manager on/off. i've already implemented it for myself but i think it would be nice feature for everyone.


agreed

will be done in v1.0.9 ...

WSH Panel Mod script discussion/help

Reply #3726
Falstaff

Is there a way to make State display only the playing icon? I find the checks distracting, and to be honest, prefer the older playlists method. The highlighted items are enough to let me know I have something selected.

EDIT: I just realized this may cause problems with playback queue. :/


overflow crash fixed ?


Hi Fakstaff,
the overflow crash is still there. I had it yesterday eve again, even with your new release. I will drop the console output in here later today when I am back home



Here is the console output:

rror: WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Object doesn't support this property or method
File: D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHheaderbar.js
Ln: 621, Col: 37
<source text only available at compile time>

WSH Panel Mod script discussion/help

Reply #3727
@falstaff, when you right click an autoplaylist in the playlist manager, you have a menu item named Edit query... - it should be named something like Autoplaylist properties because if you create an autoplaylist from an album list branch, there is no query to edit.

WSH Panel Mod script discussion/help

Reply #3728
Here is the console output:
rror: WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Object doesn't support this property or method
File: D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHheaderbar.js
Ln: 621, Col: 37
<source text only available at compile time>


thanks a lot, i'll check that asap !

@falstaff, when you right click an autoplaylist in the playlist manager, you have a menu item named Edit query... - it should be named something like Autoplaylist properties because if you create an autoplaylist from an album list branch, there is no query to edit.


well see, will be fixed,, thanks for reporting

WSH Panel Mod script discussion/help

Reply #3729
marc2003: It worked! Now everything is even better than before - thanks.

I just realized you made a tutorial on your homepage. Don't know if I'd be able to do this better by reading that but I'll at least go through it before I ask anything again

Here's a link to a picture of the result: http://tinypic.com/view.php?pic=11rf7ra&s=8

WSH Panel Mod script discussion/help

Reply #3730
i forgot to mention that you can replace the header text bit with this...

Code: [Select]
li.lastfm_modes[li.lastfm_mode].ucfirst()

WSH Panel Mod script discussion/help

Reply #3731
Ah, now it's perfect. Was searching for some cut function but didn't find something good.

It was really time for me to update, I think my foobar2000 startup time is a couple seconds faster now 

WSH Panel Mod script discussion/help

Reply #3732
Here is the console output:
rror: WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Object doesn't support this property or method
File: D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHheaderbar.js
Ln: 621, Col: 37
<source text only available at compile time>


hum, could you replace the WSHheaderbar.js file by the content of this one http://pastebin.com/03C5Y5iQ
and on crash, gimme the new console infos please, espcially from line --- error ---- to the end
thanks by advance

WSH Panel Mod script discussion/help

Reply #3733
Here is the console output:
rror: WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Object doesn't support this property or method
File: D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHheaderbar.js
Ln: 621, Col: 37
<source text only available at compile time>


hum, could you replace the WSHheaderbar.js file by the content of this one http://pastebin.com/03C5Y5iQ
and on crash, gimme the new console infos please, espcially from line --- error ---- to the end
thanks by advance


Done and unfortune, same error:

debug: ActivePlaylist = 3
debug: columnDraggedId = 13
debug: sortOrder = $if2(%length%,' 0:00') | %album artist% | $if(%album%,%date%,'9999') | %album% | %discnumber% | %tracknumber% | %title%
debug: sortedColumnDirection = 1
Error: WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Object doesn't support this property or method
File: D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHheaderbar.js
Ln: 626, Col: 37
<source text only available at compile time>


FYI, when I click right mouse  button after crash, select configure and press ok, it is fine again.

Rerun the test again with selecting another artist, again the same but after right click mouse etc. it was fine again:

--- error ----
debug: ActivePlaylist = 1
debug: columnDraggedId = 13
debug: sortOrder = $if2(%length%,' 0:00') | %album artist% | $if(%album%,%date%,'9999') | %album% | %discnumber% | %tracknumber% | %title%
debug: sortedColumnDirection = 1
Error: WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Object doesn't support this property or method
File: D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHheaderbar.js
Ln: 626, Col: 37
<source text only available at compile time>
WSH Panel Mod: Warning: Could not load file D:\foobar2000-test-v102\components\jscript.api
WSH Panel Mod: Warning: Could not load file D:\foobar2000-test-v102\components\interface.api
WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Parsing file "D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHcommon.js"
WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Parsing file "D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHinputbox.js"
WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Parsing file "D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHtopbar.js"
WSH Panel Mod (JSPlaylist v1.0.8 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Parsing file "D:\foobar2000-test-v102\wsh_br3tt\jsplaylist\js\WSHscrollbar.js"

WSH Panel Mod script discussion/help

Reply #3734
it looks like your panel doesn't support this function: plman.SortByFormatV2

one explanation would be not having the latest version of WSH panel mod. you can check by looking at file>preferences>components. it needs to be 1.5.6. btw, falstaff does mention this with a link to the component site on his DA page.

 

WSH Panel Mod script discussion/help

Reply #3735
marc2003 is right, it seems you are not running WSH Panel Mod v1.5.6 but an earlier version

WSH Panel Mod script discussion/help

Reply #3736
marc2003 is right, it seems you are not running WSH Panel Mod v1.5.6 but an earlier version



Yep, you both right, was on older version. Have installed 1.5.6 and it worked perfect.
My excuses for this issue.



WSH Panel Mod script discussion/help

Reply #3739
Hello there, new user here.

I'm starting to really get into scripting wsh panels and I've got a question about the drag functionality.
So far I have a playlist-tabs script working pretty well, and I can drag music files into each tab to have them added.

The only thing that annoys me, is this tooltip that comes up during on_drag_x events saying "Link" and I seem to be unable to alter the text to something else like "Add x files to y playlist".
I'm not sure if this has come up before, and I tried searching the forum but didn't find any posts of relevance.
I tried creating a new tooltip to see if that would get drawn over the other one or something, but it doesn't seem to work.

For reference, here is the script that I heavily modified from Br3tt's (thanks a lot for the easy start haha)
http://pastie.org/9878096
Differences are mainly:
- how the script operates
- flat panel design that grabs user colour theme
- tabs that auto-resize based on text length using gr.CalcTextWidth(string, gdi.font)
The only functionality I know I'm missing right now is:
- right-click context menus
- tab scrolling once you have more tabs than the width of the window
- draggable tabs to reorder them across the window
If anyone likes the script, I'll eventually repost with that stuff added in.
I tried to comment as much as possible to help anyone interested.

Thanks for your help!

WSH Panel Mod script discussion/help

Reply #3740
^ script unsable, many var declarations are missing, could you post the entire script please. Thank you.


var g_instancetype = window.InstanceType; just missing, fixed

WSH Panel Mod script discussion/help

Reply #3741
@marc,
I want create buttons for switching between last.fm mods in your Last.fm Similar Artists script
I did like below but It doesn't work plz help

b.buttons.toptracks= new button(,,  function() {  this.lastfm_mode =4; window.Repaint();  },

WSH Panel Mod script discussion/help

Reply #3742
to save yourself duplicating the same code, create a new function and then call that from the button. add this at the start of your panel... edit: it needs to go just after the line that begins var li = new list(...

Code: [Select]
li.lastfm_change_mode = function (m) 
    this.lastfm_mode = m;
    window.SetProperty("2k3.lastfm_mode", this.lastfm_mode); //store the value so it's remembered on panel reload/foobar restart
    this.artist = ""; //the panel won't update if the artist doesn't change so i just clear it
    p.item_focus_change(); //this calls the function that refreshes the panel - don't repaint because it's already done for you
}

then when you create your buttons...
Code: [Select]
//1st
b.buttons.similar = new button(x,y,w,h,image,function() { li.lastfm_change_mode(0); }, tooltip);
//2nd
b.buttons.tag = new button(x,y,w,h,image,function() { li.lastfm_change_mode(1); }, tooltip);
//etc

WSH Panel Mod script discussion/help

Reply #3743
to save yourself duplicating the same code, create a new function and then call that from the button. add this at the start of your panel... edit: it needs to go just after the line that begins var li = new list(...
That did the trick! Thank you so much!!

WSH Panel Mod script discussion/help

Reply #3744
tell me how to draw a triangle?
may be have a guide for drawing different objects.
Googled java script guide, he found nothing on the drawing objects....


WSH Panel Mod script discussion/help

Reply #3746
marc2003, thank you for your help 

WSH Panel Mod script discussion/help

Reply #3747
Falstaff,
Question:
You can add to the playlist manager option sorting alphabetically?
(for some reason this option not present anywhere, only seen in the component: "Playlist Organizer", but this spoils the whole design)

WSH Panel Mod script discussion/help

Reply #3748
Falstaff,
Question:
You can add to the playlist manager option sorting alphabetically?
(for some reason this option not present anywhere, only seen in the component: "Playlist Organizer", but this spoils the whole design)


why not