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

WSH Panel Mod

Reply #800
fb.RunMainMenuCommand( "A custom Last.fm station.")

WSH Panel Mod

Reply #801
fb.RunMainMenuCommand( "A custom Last.fm station.")

Ok i dont get why it works ... I mean it s not the full path to the command. And moreover you just put one "." at the end :s

Anyway thanks a lot!

WSH Panel Mod

Reply #802
i've just noticed that utils.GetAlbumArtV2 and utils.GetAlbumArtAsync aren't getting the "Stub image path:" set in the display preferences anymore. but if i go back to 1.3.1, it works fine.

WSH Panel Mod

Reply #803
Confirmed.
Haven't noticed it so far, since i use own stub images in my cover panel, when there are no stub image paths set in the display preferences.

WSH Panel Mod

Reply #804
Sometime in december I wrote this:
Quote
When I have a WSH panel open (even without any code in it) the cpu usage in Win7 64-bit is around 2% almost constantly. As soon as I close the panel, the cpu usage drops to 0% instantly. This happens in any recent foobar2000 version, and it seems that this doesn't happen in XP... Why does this happen?

Using WSH panel mod 1.2.1

T.P Wang, you answered me this:
Quote from:  link=msg=674682 date=0
@jeremija:
No idea, maybe you should have Process Explorer
to see whats happening?

but I just realized that you answered. Here is what the process explorer says (CPU for thread 3488 varies between 0 and 3%):


When I close the WSH panel, the cycles for 0x8d3d0 stay pretty much the same (this is while playing a FLAC file), but CPU usage zero. Also, when the playback is stopped, there is also no cpu usage whatsoever, no matter if the WSH panel is open or closed.
If there is more information I can get from process explorer, please tell me what would be necessary to track the problem down.

WSH Panel Mod

Reply #805
I just installed rainmeter and I think I discovered something. The idle CPU usage in rainmeter (win7) while having simple widgets turned on is about 10-20%; in XP idle CPU is zero. After seeing in the Process Explorer shows that it's using gdiplus.dll, like WSH panel, I stumbled upon this link.

Could it be that this is the reason why I am having troubles with idle CPU usage in WSH panel mod? If so, I guess that there is no solution to this?

WSH Panel Mod

Reply #806
Here is a totally noob question about the vkey.

I added this line of code to my script for showing some menu items only when shift key is down, i found it from some script and it works great 

//----------------------------------------------------
function on_mouse_rbtn_down(x, y, vkey){
   ShiftDown = vkey==6 ? true : false;
}
//----------------------------------------------------

and now to the question, where this key 6 is taken from? because i google it for two hours now and closest thing i found is in this list link
but there the shift key code is 16 and thats not working on wsh panel, i ask this because what if i want to use some other key while pressing mouse button
like. Ctrl or Alt.
Is there some special list of vkeys that work on wsh panel mod? and where can i found them?

And then there is this on the flags.txt

// Used in mouse callbacks, as mask, used in on_mouse_lbtn_up(), on_mouse_rbtn_up() and so on

MK_SHIFT    = 0x0004; // The SHIFT key is down.
MK_CONTROL  = 0x0008; // The CTRL key is down.

is this the same thing? I have no clue how to use these. 

WSH Panel Mod

Reply #807
Is there some special list of vkeys that work on wsh panel mod? and where can i found them?


this is a list I use:

Code: [Select]
VK_BACK = 0x08;
VK_RETURN = 0x0D;
VK_SHIFT = 0x10;
VK_CONTROL = 0x11;
VK_ALT = 0x12;
VK_ESCAPE = 0x1B;
VK_PGUP = 0x21;
VK_PGDN = 0x22;
VK_END = 0x23;
VK_HOME = 0x24;
VK_LEFT = 0x25;
VK_UP = 0x26;
VK_RIGHT = 0x27;
VK_DOWN = 0x28;
VK_INSERT = 0x2D;
VK_DELETE = 0x2E;


it is based on Microsoft's info (although I use some different names, for example VK_PGUP instead of VK_PRIOR).

 

WSH Panel Mod

Reply #808
Thanks Harm you made my life easier doday! I searched up your example FormsAndButtons and there you have KeyboardHandlings 

WSH Panel Mod

Reply #809
Thanks Harm you made my life easier doday! I searched up your example FormsAndButtons and there you have KeyboardHandlings 


That is an old version of it (look for the newer one, and I also still have to post an updated version, because I fixed some more bugs - I will probably do so later this weekend), in the more recent versions I use the new on_char callback, which makes it independent of the keyboard layout used (thanks to T.P Wang for that!), and which makes KeyboardHandlings obsolete.

WSH Panel Mod

Reply #810
@T.P Wang:

I really like the playlist functions you added recently, but I would like to request more: couldn't you add a function that returns the content of a playlist (which would add the possibility to build a playlist viewer in wsh panel mod) and maybe even the whole library (which would make creating filters possible)? I would really like to see these kind of possibilities and I am quite sure I am not the only one (correct me if I'm wrong  )

WSH Panel Mod

Reply #811
how do you use gdi.LoadImageAsync? this what i have so far

Code: [Select]
gdi.LoadImageAsync(window.ID, artist_image_path);

function on_load_image_done(tid, image) {
    artist_image = image;
    window.Repaint();
}


no errors but no image either. i'm guessing i need something to do with "tid" but i have no idea.... 

WSH Panel Mod

Reply #812
Why do i get this error everytime a close foobar?

Quote
Nombre de la aplicación con errores: foobar2000.exe, versión: 1.0.0.0, marca de tiempo: 0x4b486cb3
Nombre del módulo con errores: foo_uie_wsh_panel_mod.dll, versión: 0.0.0.0, marca de tiempo: 0x4b89dc01
Código de excepción: 0x40000015
Desplazamiento de errores: 0x00015cd0
Id. del proceso con errores: 0x1080
Hora de inicio de la aplicación con errores: 0x01cac61d3b8c9028
Ruta de acceso de la aplicación con errores: D:\Program Files\foobar2000\foobar2000.exe
Ruta de acceso del módulo con errores: D:\Program Files\foobar2000\components\foo_uie_wsh_panel_mod.dll
Id. del informe: 7d920881-3212-11df-bf55-00016c6ad442

WSH Panel Mod

Reply #813
So I am running w7 ultimate

tried using the excellent lookin Eko skin/theme..

all was well save for the errors...


Code: [Select]
Scripting Engine Initialization Failed (GUID: 5B0217C3-AA12-4042-8DDF-96D261AF3B2B, CODE: 0x80020101)
Check the console for more detailed information (Always caused by unexcepted script error).


Code: [Select]
Ln: 237, Col: 1
<source text only available in compile time>
WSH Panel Mod (GUID: 8B55BA1A-DFE6-4092-9600-94DD67B3BDC4): Parsing file "C:\Program Files\foobar2000\scripts\marc2003\v2\common.js"
Error: WSH Panel Mod (GUID: 8B55BA1A-DFE6-4092-9600-94DD67B3BDC4): Microsoft JScript runtime error:
Automation server can't create object
Ln: 237, Col: 1
<source text only available in compile time>
WSH Panel Mod (GUID: FD0DBB87-FDD5-4E6D-9507-79C606E4FEF0): Parsing file "C:\Program Files\foobar2000\scripts\marc2003\v2\common.js"
Error: WSH Panel Mod (GUID: FD0DBB87-FDD5-4E6D-9507-79C606E4FEF0): Microsoft JScript runtime error:
Automation server can't create object
Ln: 237, Col: 1
<source text only available in compile time>
WSH Panel Mod (GUID: 2F7BB1AC-E478-4091-95CD-A42D029A9A35): initliased in 0.0000015 s
WSH Panel Mod (GUID: 80D20FAB-6CA1-4A2E-A84D-A55423125C0D): initliased in 0.0000005 s
WSH Panel Mod (GUID: 53222884-B53E-4512-AD5B-E0A826B1EF3B): Parsing file "C:\Program Files\foobar2000\scripts\marc2003\v2\common.js"
Error: WSH Panel Mod (GUID: 53222884-B53E-4512-AD5B-E0A826B1EF3B): Microsoft JScript runtime error:
Automation server can't create object
Ln: 237, Col: 1
<source text only available in compile time>
WSH Panel Mod (GUID: FD0DBB87-FDD5-4E6D-9507-79C606E4FEF0): Parsing file "C:\Program Files\foobar2000\scripts\marc2003\v2\common.js"
Error: WSH Panel Mod (GUID: FD0DBB87-FDD5-4E6D-9507-79C606E4FEF0): Microsoft JScript runtime error:
Automation server can't create object
Ln: 237, Col: 1
<source text only available in compile time>
WSH Panel Mod (GUID: 2F7BB1AC-E478-4091-95CD-A42D029A9A35): initliased in 0.0000005 s
WSH Panel Mod (GUID: 80D20FAB-6CA1-4A2E-A84D-A55423125C0D): initliased in 0.0000004 s
WSH Panel Mod (GUID: 53222884-B53E-4512-AD5B-E0A826B1EF3B): Parsing file "C:\Program Files\foobar2000\scripts\marc2003\v2\common.js"
Error: WSH Panel Mod (GUID: 53222884-B53E-4512-AD5B-E0A826B1EF3B): Microsoft JScript runtime error:
Automation server can't create object
Ln: 237, Col: 1
<source text only available in compile time>
Facet initialized in : 0:00.029
Facet initialized in : 0:00.282
WSH Panel Mod (GUID: 19664353-07B9-4CEE-A639-E80AB244A731): initliased in 0.0000022 s
WSH Panel Mod (GUID: 5B0217C3-AA12-4042-8DDF-96D261AF3B2B): Parsing file "C:\Program Files\foobar2000\scripts\marc2003\v2\common.js"
Error: WSH Panel Mod (GUID: 5B0217C3-AA12-4042-8DDF-96D261AF3B2B): Microsoft JScript runtime error:
Automation server can't create object
Ln: 237, Col: 1
<source text only available in compile time>
Startup time : 0:00.704799


help?

WSH Panel Mod

Reply #814
Menu File --> Preferences --> Tools --> WSH Panel mod --> disable "Safe mode"

WSH Panel Mod

Reply #815
Looked through the thread, couldn't find a solution to my problem, although it's similar to a lot of the ones I'm seeing.

WSH Panel Mod (GUID: E434AFA9-DD73-4D14-849A-F8585E888C21): initliased in 0.0000156 s
Error: WSH Panel Mod (GUID: E434AFA9-DD73-4D14-849A-F8585E888C21): Microsoft JScript runtime error:
Object required
Ln: 112, Col: 5
<source text only available in compile time>
Startup time : 0:00.220720

Disabled "Safe Mode" didn't do anything.
I don't remember this ever happening before. I currently have a dual-screen setup if that might be the cause, somehow.

WSH Panel Mod

Reply #816
If that's someone else's script you probably have it installed in the wrong directory. Try looking at the source and finding the path it's looking for.

WSH Panel Mod

Reply #817
It was my code.. that was kind of silly of me? The directory I had it pointing to did not exist. But, the function tied to that did nothing in the first place because it was incomplete.

WSH Panel Mod

Reply #818
is there a way to use a wsh panel to force my facets to be re-initialized?
problem is i wanna have a character in front of my dir name to see whether a track is played or not.
my syntax works but only after re-initializing my facets.
here is what i have:
$ifgreater(%LASTFM_PLAYCOUNT_DB2%,,'[♫]','[    ]') [%directoryname%]
maybe someone has a better idea

WSH Panel Mod

Reply #819
@T.P Wang: i would like to know exactly what happens when we open foobar for all the WSH Panel Mod.
THe reason is that on one of my panels, if the panel is visible during startup then the panel is correctly refreshed, but if it is not visible during startup it s not refreshed. I dont really know why as i refresh all my panels directly in the script when it is loaded.

Hope you can help
Thanks.

WSH Panel Mod

Reply #820
hi i have a question
i'm building a nfo reader but i have a little problem
when i use

Code: [Select]
file = fso.OpenTextFile(varwithnfofilepath, 1);


where varwithnfofilepath is a variable with the full path to the nfo file (with double slashes) created by a function it gives

Code: [Select]
Error: WSH Panel Mod (GUID: 8A806A77-188B-4133-9466-70934BD26F1F): Microsoft JScript runtime error:
Bad file name or number


but when i try to fill in the path with double quotes myself like:
Code: [Select]
file = fso.OpenTextFile("e://music//test.nfo", 1);

it works

any help please!
if someone can solve this i have a working nfo viewer in a WSH panel

WSH Panel Mod

Reply #821
nevermind up here

fixed

just one thing to fix before it works

WSH Panel Mod

Reply #822
I created my first cover panel script and i'm quite happy with it, the only thing i'd like to add is something like this:

function on_playback_new_track() {
id = 0; //This changes the cover art to front cover (if cover is at the moment back, cd, or artist) everytime the new track begins.
}

Now what i like to tell this function is change cover to front only when meta album is changed.

Something like id = 0 only when %album% is changed.

i need omething like function on_playback_new_album()

but i can't figure out how to too that.

I have tried
function on_metadb_changed(metadb, fromhook) {}
but without any luck.

I'm sure somebody here knows simple way how to too this. Little help please.

WSH Panel Mod

Reply #823
Code: [Select]
var album_tf = fb.TitleFormat("%album%");
var album = null;

function on_playback_new_track() {
   if(album_tf.Eval() == album) return;
   album = album_tf.Eval();
   .......
}

WSH Panel Mod

Reply #824
Thousand thanks marc2003 it works!!