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 (Read 803615 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

WSH Panel Mod

Reply #1500
Nice job, marc. Nothing exploded \o/.

Now we just need someone to tackle CUI (I'm looking right at you filters that don't have an option for playlists).



WSH Panel Mod

Reply #1503
it works (tested)

but i dunno yet if this will be useful, but as you add a such context feature, it was logic to provide it as a method if someone needs to use it in a custom menu or button like you tell in the changelog... so Thank you.



WSH Panel Mod

Reply #1504
it could be useful for me. i currently have an "update script" feature that checks for an updated common file online and saves it a "marc2003" subfolder of the user's foobar profile if it's different. currently the user is prompted to restart foobar for the changes to take effect. with this, i can reload the panels without restarting. i'll have to make my script check the feature is available or not because the vast majority of people will only be using the official component.

next on my to do list (if i can) is window.ClearProperties - should be self explanatory from the name.

WSH Panel Mod

Reply #1505
it could be useful for me. i currently have an "update script" feature that checks for an updated common file online and saves it a "marc2003" subfolder of the user's foobar profile if it's different. currently the user is prompted to restart foobar for the changes to take effect. with this, i can reload the panels without restarting. i'll have to make my script check the feature is available or not because the vast majority of people will only be using the official component.

next on my to do list (if i can) is window.ClearProperties - should be self explanatory from the name.


i will request it from you, so glad to see this feature is missing to you too, but i'd suggest new methods for properties:
window.RemoveProperty(name);
window.ClearProperties();


WSH Panel Mod

Reply #1506
i had a look at clearing properties but i think it's beyond me. i don't really want to start hacking at stuff i don't know about. i'm entirely confident about my previous changes because they were so easy but this isn't.

Quote
window.RemoveProperty(name);


you can already do this...

Code: [Select]
window.SetProperty("blah", null);


i suppose you could write your own reset function containing all known values by your own scripts - you just won't be able to clear values left behind by others.


WSH Panel Mod

Reply #1508
you can already do this...

Code: [Select]
window.SetProperty("blah", null);


i suppose you could write your own reset function containing all known values by your own scripts - you just won't be able to clear values left behind by others.


i wasn't aware from this possibility  , thank you to learn me that, it will be useful for sure

WSH Panel Mod

Reply #1509
it is done. 

Code: [Select]
v1.5.7.1
- ADD: window.Reload() so you can force a panel reload from your own menus, buttons, functions etc.


https://dl.dropboxusercontent.com/u/2280132...h_panel_mod.zip


WSH Panel Mod ({30E5E5AB-C693-4364-BBC6-5F20AC7C8C8D}): ?????? ?????????? Microsoft JScript:
?????? ?? ???????????? ??? ???????? ??? ?????
File: C:\Program Files (x86)\Foobar2000\skins\tech\scripts\Button.js
Line: 121, Col: 25
<source text only available at compile time>

WSH Panel Mod

Reply #1510
i don't know what is on line 121 of your script...   

if it works on the previous version, my guess is that it uses one of the functions i removed. those are detailed in the changelog. if you have no idea what i'm talking about, then just use the older version.

WSH Panel Mod

Reply #1511
i don't know what is on line 121 of your script...   

if it works on the previous version, my guess is that it uses one of the functions i removed. those are detailed in the changelog. if you have no idea what i'm talking about, then just use the older version.

OK! Thanks !!!

WSH Panel Mod

Reply #1512
so if I wanted to start using this panel, which language should I learn? the drop-down for the script engine offers Jscript, Jscript9, and JScrip VBscript - what is the difference, and is one definitively better?

WSH Panel Mod

Reply #1513
so if I wanted to start using this panel, which language should I learn? the drop-down for the script engine offers Jscript, Jscript9, and JScrip VBscript - what is the difference, and is one definitively better?


JScript is basically just JavaScript with some MS features. A JS engine is the interpreter for your code - you can stick with the default. I think JScript9 has some problems with mouseover events under Windows 8...

WSH Panel Mod

Reply #1514
it is done. 

Code: [Select]
v1.5.7.1
- ADD: window.Reload() so you can force a panel reload from your own menus, buttons, functions etc.


https://dl.dropboxusercontent.com/u/2280132...h_panel_mod.zip


I'm now using fooRazor skin from Br3tt.
After updating panel_mod from 1.5.6 to 1.5.7.1, I got the follwoing message.
Could you help me?

WSH Panel Mod (WSH Controls v1.0.0 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): JavaScript runtime error:
Object doesn't support property or method 'WatchMetadb'
File: <main>
Line: 596, Col: 9
<source text only available at compile time

WSH Panel Mod

Reply #1515
it is done. 

Code: [Select]
v1.5.7.1
- ADD: window.Reload() so you can force a panel reload from your own menus, buttons, functions etc.


https://dl.dropboxusercontent.com/u/2280132...h_panel_mod.zip


I'm now using fooRazor skin from Br3tt.
After updating panel_mod from 1.5.6 to 1.5.7.1, I got the follwoing message.
Could you help me?

WSH Panel Mod (WSH Controls v1.0.0 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): JavaScript runtime error:
Object doesn't support property or method 'WatchMetadb'
File: <main>
Line: 596, Col: 9
<source text only available at compile time



sure, go back to WSH PAnel Mod v1.5.6 because i'm too lazy for now (maybe not later) to fix all my old WSH configs to be compatible with new WSH Panel Mod version.

WSH Panel Mod

Reply #1516
with regards to updating the metadb stuff, here's how the relevant part of an old script might look...

Code: [Select]
function on_item_focus_change() {
    if(g_metadb) window.UnwatchMetadb();
    g_metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
    if(g_metadb) {
        on_metadb_changed();
        window.WatchMetadb(g_metadb);
    }
}


to fix it, you need to have a preprocessor section at the very top of the script.

Code: [Select]
// ==PREPROCESSOR==
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==


if your script already has a preprocessor section, just add those 2 @feature lines. then replace the on_item_focus_change function with this...

Code: [Select]
function on_item_focus_change() {
    g_metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
    if (g_metadb) on_metadb_changed();
}


before anyone asks, i'm not getting involved in fixing anyone's timer stuff. everyone can figure that out for themselves or use the older component.




WSH Panel Mod

Reply #1520
another update. 

Code: [Select]
v1.5.8 Beta 1
- ADD: fb.ShowLibrarySearchUI(query) opens the Library>Search window populated with the query you set.
- ADD: fb.GetLibraryItems() returns a handle list of all items in library.
- ADD: on_library_changed callback for when library items are added, removed or modified.


https://dl.dropboxusercontent.com/u/2280132...h_panel_mod.zip

WSH Panel Mod

Reply #1521
- ADD: fb.GetLibraryItems() returns a handle list of all items in library.
- ADD: on_library_changed callback for when library items are added, removed or modified.[/code]

Fantastic !  Goodbye, Album list ?

WSH Panel Mod

Reply #1522
^ Thank you for library support, that's a great improvement and many library script will have to use this now  ... can't wait to test it (i can't for now but this evening ...)

WSH Panel Mod

Reply #1523
^i was hoping you might do something with it. it needs testing with large collections because mine is so small, it's embarrassing. it should work the same as the playlist handle lists - after all it was mainly copy/pasting from what was already there.

WSH Panel Mod

Reply #1524
^i was hoping you might do something with it. it needs testing with large collections because mine is so small, it's embarrassing. it should work the same as the playlist handle lists - after all it was mainly copy/pasting from what was already there.

Total 3-4 TB in several different directories at first will be enough?