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


WSH Panel Mod

Reply #1027
Horrible Bugs and horrible number of beta version...

actually the leak began appearing on beta3.... and i just thought it was a mistake caused by my poor scripts...
mad messy misanthropist morbid mused

 

WSH Panel Mod

Reply #1028
Horrible Bugs and horrible number of beta version...

actually the leak began appearing on beta3.... and i just thought it was a mistake caused by my poor scripts...


You should give more information about your leaks ... is it on the last beta (v6) too ? because i use complex script with it, and now all seems to work fine.

WSH Panel Mod

Reply #1029
Horrible Bugs and horrible number of beta version...

actually the leak began appearing on beta3.... and i just thought it was a mistake caused by my poor scripts...


You should give more information about your leaks ... is it on the last beta (v6) too ? because i use complex script with it, and now all seems to work fine.

it works very well on b6.

i found the 1.4.0 series becoming too complex...a lot to consider while compiling codes.
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #1030
I am a relatively new user of this component and there's one thing i would like to know before using it more actively.
Where should i put "jscript.api" and "interface.api"?

WSH Panel Mod

Reply #1031
in folder, where the component .dll file resides

those are just call-tips used by this component built-in editor control

WSH Panel Mod

Reply #1032
Okay i'll try that.
Thanks for the help.

WSH Panel Mod

Reply #1033
I am just starting to port all my old wsh stuff to the new wsh mod.

It seems to me that the right button callbacks cannot really be used at all since right button click will pop up the wsh properties and configure menu.
also the left double click callback cannot be used if the left button down callback is used because the first click will bring up the left button down callback.

Perhaps I am wrong. If so, please tell me otherwise. Thanks.

ftc

WSH Panel Mod

Reply #1034
@freetochoose:
return true in right mouse up callback handlers.
Refer to Callbacks.txt

WSH Panel Mod

Reply #1035
@T.P Wang:

Thanks for the new playlist features! I do have one more request, though. I have written a script that can search for similar files, in all kind of ways, by generating an autoplaylist. This works great. But I wanted to extend it with a preview of the number of results for the different options. The only way by now is to generate a temporary autoplaylist this way (simplified version):
Code: [Select]
SearchCount = function(query){
    var tmp = fb.PlaylistCount;
    fb.CreateAutoPlaylist(tmp, "*****" + SEARCHCOUNT + "*****", query);
    var out = fb.PlaylistItemCount(tmp);
    fb.RemovePlaylist(tmp);
    return out;
}

The problem of this solution is that it is very slow and it can even make fb2k freeze while browsing. Therefore I would like to ask if a functions like this can be implemented in wsh panal mod, probably even one that works asynchronously, so that it can not make the program freeze.

WSH Panel Mod

Reply #1036
@Harm

if i understand your need, you want a method that return for a query (a query like those used in an autoplaylist) the item count. But i don't think that's an elementary Method, so it's not to include in WSH panel mod ... IMHO.


WSH Panel Mod

Reply #1037
@freetochoose:
return true in right mouse up callback handlers.
Refer to Callbacks.txt



Thanks a lot T.P. Wang. It works. But in that case, I need to go to preference, layout to edit the script. But you are right.

Another question, is there a way to trigger two different functions from mouse left click and mouse left double click?
I guess probably not, because the the first click will always trigger the same event.

ftc

WSH Panel Mod

Reply #1038
@Harm

if i understand your need, you want a method that return for a query (a query like those used in an autoplaylist) the item count. But i don't think that's an elementary Method, so it's not to include in WSH panel mod ... IMHO.


where is your lyrik 1.4

and where is your new work

WSH Panel Mod

Reply #1039
And what about the feature to get all playlist tracks as Metadb Handle List? This is the only thing we don't have now to make WSH playlist panel.

WSH Panel Mod

Reply #1040
Help:

I am new to WSH mod and I have looked at sample scripts. I am wondering how I should build a custom pop-up menu. In the sample, commands are executed by ID number. But I am not sure I know what number correspond to what command. Or is there a list? Can someone give me an example of a custom pop-up menu with a few commands. Thanks.

ftc

WSH Panel Mod

Reply #1041
Help:

I am new to WSH mod and I have looked at sample scripts. I am wondering how I should build a custom pop-up menu. In the sample, commands are executed by ID number. But I am not sure I know what number correspond to what command. Or is there a list? Can someone give me an example of a custom pop-up menu with a few commands. Thanks.

ftc

the ID is assigned when you create the menu

AppendMenuItem(flags, item_id, text)
what you need to do is give it an item_id parameter.

the TrackPopupMenu(x, y, flags = 0) function will return the item_id of selected item in the menu, and then, the switch structure will execute the correspondent command.

this is a sample:
function popuppop(x,y,Aniflag){

var _root = window.CreatePopupMenu();
var ret;

_root.AppendMenuItem(MF_STRING, 1, "Command 1");
_root.AppendMenuItem(MF_STRING, 2, "Command 2");
_root.AppendMenuSeparator();
_root.AppendMenuItem(MF_STRING, 3, "Command 3");

ret = _root.TrackPopupMenu(x, y, Aniflag);

switch(ret){
case 1:
fb.PlayOrPause();
case 2:
fb.Exit();
case 3:
fb.Stop();
}

_root.Dispose();
}

this function should be in mouse related callback function, and Aniflag is manually assigned parameter.
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #1042
Thanks a lot.

I am wondering how I should go about creating a menu that has items that I often use. For example, in addition to the foobar supplied menu, I want to include these items
  Set Replay Gain to Track
  Set Replay Gain to Album
  Playback Order with submenu Default, Repeat Track, Repeat Playlist, Random
  Bring up the Preference Page
  Bring up the DSP Manager
  View Playlist with submenu View Tab 1, View Tab 2, View Tab 3

I think wsh mod supplies function calls to bring up the preference page and set different playback orders.
Are there other function calls that I can use to do the other things?

Any help will be appreciated.

ftc

WSH Panel Mod

Reply #1043
Is it somehow possible to add specific files to some playlist with new WSH methods? I mean something like "AddToPlaylist(metadbhandle, playlist_idx)".

WSH Panel Mod

Reply #1044
v1.4.0 final released, thanx T.P

Question/Request: Could WSH panel Mod provide an easy way to transform an autoplaylist in a normal playlist ?

WSH Panel Mod

Reply #1045
// [1.4.0] Updated:
   // Returns null if file cannot be read or doesn't exist.
   // Text file can be either: UTF-16 with BOM, UTF-8 with BOM and ANSI.
   // You can consider using helper routines for codepage in Codepages.txt.
   String ReadTextFile(filename, codepage = 0);

thanx a lot for this, my WSH lyriks panel is now more reliable with all charsets ([encoding:xxxx] had to be set in the lyric file to be parsed, if not, i assume utf-8 by default)


WSH Panel Mod

Reply #1046
I tried to use the ReadTextFile method but I got "Invalid procedure call or argument". I simply used it like this "blacklist = utils.ReadTextFile(blacklist_file)" with blacklist_file is a the fullpath to a file. What's wrong?

WSH Panel Mod

Reply #1047
I tried to use the ReadTextFile method but I got "Invalid procedure call or argument". I simply used it like this "blacklist = utils.ReadTextFile(blacklist_file)" with blacklist_file is a the fullpath to a file. What's wrong?


you haven't set the codepage in arguments!

try
utils.ReadTextFile(blacklist_file,<valid_codepage>)

you can consider using helper routines for codepage in Codepages.txt

WSH Panel Mod

Reply #1048
ok, I got it to work now, I thought it was optional.

WSH Panel Mod

Reply #1049
@thuan:
It's a bug indeed, I'll make a quick fix ASAP.

EDIT: Quick fix uploaded.