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

WSH Panel Mod script discussion/help

Reply #1225
How to use the new window.SetInterval() and window.SetTimeout()?
I tried replacing window.CreateTimerInterval(50) with window.SetInterval(50) but got a crash...
What's wrong?


here is an example that works, it refresh the display (paint) only after 50 ms when used, i use this to optimize refresh in the callback on_mouse_wheel() ;-)

Code: [Select]
    // Globals
    var mousewheel_timerID = false;


Code: [Select]
...
    if(!mousewheel_timerID) {
        mousewheel_timerID = window.SetTimeout(function() {
            window.Repaint();
            mousewheel_timerID = false;
        }, 25);
    }
...

WSH Panel Mod script discussion/help

Reply #1226
Thanks, i just found the "timer" sample in the samples-folder 
Wow, have to rewrite my scripts now.

EDIT:
Is function on_timer(timer_id) now obsolete, too, since the function is called inside SetInterval/Timeout now?
I'm way more confused... 

WSH Panel Mod script discussion/help

Reply #1227
Thank you once again Marc, I will see if I can get it done!


WSH Panel Mod script discussion/help

Reply #1229
Time to share my 2 new scripts : a Tabbed Playlist Manager panel and a Simple Playlist Viewer panel

[Requirements]
* foobar2000 v1.1 or better ( >> http://foobar2000.org)
* WSH panel Mod v1.5.0 or better ( >> http://http://code.google.com/p/foo-wsh-pa...downloads/list)
* Fonts :
  - guifx v2 transports ( >> http://http://blog.guifx.com/2009/04/02/gu...transport-font)
  - lucida console (bundled with Windows)
  - tahoma (bundled with Windows)

Get them by importing this DefaultUI theme file: [link]


WSH Panel Mod script discussion/help

Reply #1230
Falstaff, one question -
I am using CUI and I would love to try your playlist viewer; can I get it via importing the above file wiithout loosing my layout? If not, could you possibly offer that one seperately?

WSH Panel Mod script discussion/help

Reply #1231
Bravo Falstaff, it work like a charm!

Very impressive.

WSH Panel Mod script discussion/help

Reply #1232
Falstaff, the tabbed playlist manager don't populate in CUI.
How come?
thanks.

WSH Panel Mod script discussion/help

Reply #1233
Falstaff, one question -
I am using CUI and I would love to try your playlist viewer; can I get it via importing the above file wiithout loosing my layout? If not, could you possibly offer that one seperately?


right click panel (columns header for the playlist viewer / a button for the taabed playlist manager) > Configure

it will open the edit window, there is a button 'Tools' on bottom left, use it to export/import script or just select the text of the script and copy/past it to another new WSH panel to one of your config, CUI or DUI

nothing more to do

WSH Panel Mod script discussion/help

Reply #1234
Falstaff, the tabbed playlist manager don't populate in CUI.
How come?
thanks.


of course it does, you maybe haven't right copied/pasted it into you WSH panel in your CUI config, try again please

EDIT: have you the last version of WSH panel Mod installed (v1.5.0 final) ?

WSH Panel Mod script discussion/help

Reply #1235
small bug, if you use the mouse wheel up even if the playlist is already on top, it starts to scroll down, weird  but funny

WSH Panel Mod script discussion/help

Reply #1236
small bug, if you use the mouse wheel up even if the playlist is already on top, it starts to scroll down, weird  but funny


not a bug due to my script, i've encountered a such bug on a laptop, it's the mouse driver that is missing, the default driver of windows is not enough. apparently, it seems that WSH panel mod requires you install the good mouse driver of your mouse model.

try, (i've fixed it this way), it will fix your issue

WSH Panel Mod script discussion/help

Reply #1237
Uhm, I thought the fth files go into the DUI dialog...importing a script into wsh panel mod is no problem - anyway, will look into that now, thanks.

EDIT: My problem is, the zip only contains the fth file, so I cant get the script out of it without loading that, hence the question

 

WSH Panel Mod script discussion/help

Reply #1238

EDIT: have you the last version of WSH panel Mod installed (v1.5.0 final) ?
[/quote]


Yes,  I do (just re-installed it, to be sure), and I also re-export both your scripts from a DUI to my CUI, both scripts works well in DUI, but the tab won't populated in CUI.

Too bad for me.

WSH Panel Mod script discussion/help

Reply #1239
Code: [Select]
_child.AppendTo(_menu, MF_STRING, "Background");

BTW, MF_STRING seems not necessary.  This works fine too:
Code: [Select]
_child.AppendTo(_menu, 0, "Background");

It works because MF_STRING = 0x00000000, but it is really not a good idea to replace constants by their value.

WSH Panel Mod script discussion/help

Reply #1240
Yes,  I do (just re-installed it, to be sure), and I also re-export both your scripts from a DUI to my CUI, both scripts works well in DUI, but the tab won't populated in CUI.

Too bad for me.


it works fine for me under CUI, i can't reproduce your problem.

Has somebody else tested the script under CUI ?

WSH Panel Mod script discussion/help

Reply #1241
Yes,  I do (just re-installed it, to be sure), and I also re-export both your scripts from a DUI to my CUI, both scripts works well in DUI, but the tab won't populated in CUI.

Too bad for me.


it works fine for me under CUI, i can't reproduce your problem.

Has somebody else tested the script under CUI ?


I can not even make the tabs work under DUI. fb says there is something wrong in line
when i import the fth file, a message pops out:

Scripting Engine Initialization Failed (WSH Tabbed Playlist Manager v3.0 by Br3tt, CODE: 0x80020101)
Check the console for more information (Always caused by unexcepted script error).

####
solved!!
line 227 should be:

    pad_right : bt_w * 2, scroll : false, scroll_step : 40, pos : 0

delete the comma at last.
mad messy misanthropist morbid mused

WSH Panel Mod script discussion/help

Reply #1242
.zip updated with original scripts ! the ones shared before have been compressed to remove comments and to adjust indentations .... that coukd brought some bug apparently !

so, for those who had problem, download the new .zip to fix your issues, they should be gone!

or here is direct link to the script :

* tabbed playlist manager : http://pastebin.com/Lf3uqjaz

* simple playlist viewer : http://pastebin.com/k87s135g

WSH Panel Mod script discussion/help

Reply #1243
small bug, if you use the mouse wheel up even if the playlist is already on top, it starts to scroll down, weird  but funny


not a bug due to my script, i've encountered a such bug on a laptop, it's the mouse driver that is missing, the default driver of windows is not enough. apparently, it seems that WSH panel mod requires you install the good mouse driver of your mouse model.

try, (i've fixed it this way), it will fix your issue

well I use the latest Intellipoint driver (microsoft mouse), but I'll test it later on my PC (no trackball/touchpad)

thanks

WSH Panel Mod script discussion/help

Reply #1244
can anybody answer me? i writed below. its important to me

WSH Panel Mod script discussion/help

Reply #1245
i need for a callback, which will execute some script when i put in my usb player or cd. I havant any idea, except to check number of drives on timer, but i think it bery busy for cpu.
i need to new a cpu`s count (with hyper threading)
for example i launch the lame.exe encoder. how could i now that he already done his task?


i dunno

is it possible to get a list of javascript files (js) in some folder and include them?


yes, it's possible to check content of a folder and read/write text files with jscript, and so, with WSH panel Mod, check msdn javascript for examples, i'm not at home and i haven't samples on the hand right now.

also, i want to ask: is it possible to read and edit foobars core cfg-files through wsh?


.cfg are binaries files, so afaik, it's not possible to read/write them from WSH panel mod.

WSH Panel Mod script discussion/help

Reply #1246
very sad. Id like to write something like ipod manager for foobar, but for converting music to regular usb player, because inner foobars converter isnt handy. seems, i need to learn how to write a dll-plugins

WSH Panel Mod script discussion/help

Reply #1247
Falstaff: just to be sure, I try both your scripts on a fresh fb installation, with the correct WSH panel mod and the proper interface.api and jscript.api, both script works very well with DUI, but the tabbed playlist still don't work with CUI and there is no error message on the console.
Anyways, your simple playlist did became my default playlist.

Great work.

WSH Panel Mod script discussion/help

Reply #1248
Falstaff: just to be sure, I try both your scripts on a fresh fb installation, with the correct WSH panel mod and the proper interface.api and jscript.api, both script works very well with DUI, but the tabbed playlist still don't work with CUI and there is no error message on the console.
Anyways, your simple playlist did became my default playlist.

Great work.


very weird, i'm curious to find another case for who it doesn't work too under CUI ...?? you should be more accurate please

WSH Panel Mod script discussion/help

Reply #1249
samples updated: http://dl.dropbox.com/u/22801321/samples.zip

bugfix: simple biography & simple text reader row height is now dynamic dependent on font instead of the fixed size it was before.

(existing users need to extract the marc2003 folder again and import the updated script)