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

WSH Panel Mod

Reply #900
certainly impossible....though the WSH could create animation, the parameters related with the spectrum did not exist.

I suspected as much. Thanks for the confirmation. This means there will be an ugly gray line between my WSH panel and my visualization. Any recommendations to eliminate it? All I can think to try is PSS, but I'm hoping for a simpler solution.

've you tried the Channel spectrum panel? it can set the border style to none..
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #901
deleted
🇺🇦 Glory to Ukraine!

WSH Panel Mod

Reply #902
've you tried the Channel spectrum panel? it can set the border style to none..

Yeah, sorry I should have been more clear. I'm not referring to the border style of the visualization. I'm referring to the drag edge of the panel splitter. My understanding is that the color of the panel splitter edge is determined by the system (default is gray on Windows 7 Aero theme). And I'd rather not change my system settings just to get foobar to look how I want. If my WSH panel background deviates from the system gray, the panel edge becomes very visible.
So are there any other options besides PSS to place a WSH panel and a visualization panel next to each other without having a visible edge between them?

WSH Panel Mod

Reply #903
've you tried the Channel spectrum panel? it can set the border style to none..

Yeah, sorry I should have been more clear. I'm not referring to the border style of the visualization. I'm referring to the drag edge of the panel splitter. My understanding is that the color of the panel splitter edge is determined by the system (default is gray on Windows 7 Aero theme). And I'd rather not change my system settings just to get foobar to look how I want. If my WSH panel background deviates from the system gray, the panel edge becomes very visible.
So are there any other options besides PSS to place a WSH panel and a visualization panel next to each other without having a visible edge between them?

you can check "forced layout" in PSS,then input the panel's parameters and might you also need check Ignore panel size limits~refer to the readme.txt of PSS
as for the background color,you can fill a solid rectangular in you WSH with you fave color,or you can check the pseudo-transparent in you WSH,and set BG color in PSS' bahavior sheet"custom background color"
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #904
you can check "forced layout" in PSS,then input the panel's parameters and might you also need check Ignore panel size limits~refer to the readme.txt of PSS
as for the background color,you can fill a solid rectangular in you WSH with you fave color,or you can check the pseudo-transparent in you WSH,and set BG color in PSS' bahavior sheet"custom background color"

Guess I'll have to surrender and use PSS! ^^ (Ooh, mojibake! Must be Shift-JIS.) Thank you for everything! m(_)m

Staying on topic, in WSH is it preferred to create one big script/panel (i.e. playback control buttons, album art display, volume control, seekbar, text display, etc) all together,
or is it preferred to create several smaller scripts/panels each with a specific purpose (i.e. playback control buttons in one panel, album art display in a separate panel, etc.)?
Is there a mentionable difference in CPU performance between the two methods?

WSH Panel Mod

Reply #905
you can check "forced layout" in PSS,then input the panel's parameters and might you also need check Ignore panel size limits~refer to the readme.txt of PSS
as for the background color,you can fill a solid rectangular in you WSH with you fave color,or you can check the pseudo-transparent in you WSH,and set BG color in PSS' bahavior sheet"custom background color"

Guess I'll have to surrender and use PSS! ^^ (Ooh, mojibake! Must be Shift-JIS.) Thank you for everything! m(_)m

Staying on topic, in WSH is it preferred to create one big script/panel (i.e. playback control buttons, album art display, volume control, seekbar, text display, etc) all together,
or is it preferred to create several smaller scripts/panels each with a specific purpose (i.e. playback control buttons in one panel, album art display in a separate panel, etc.)?
Is there a mentionable difference in CPU performance between the two methods?

in my opinion, the all-in-one is NOT a good choice, since this panel needs to execute callbacks frequently....
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #906
I cant find a clear answer in this thread. TP Wang, can we hope for a RunContextCommand which would work with selected files?

Thanks a lot

WSH Panel Mod

Reply #907
I'm trying to create a menu based on the example code given on the wsh panel mod project page:

Code: [Select]
// vi:set ft=javascript ff=dos ts=4 sts=4 sw=4 et:

// Flags, used by Menu
var MF_SEPARATOR = 0x00000800;
var MF_ENABLED = 0x00000000;
var MF_GRAYED = 0x00000001;
var MF_DISABLED = 0x00000002;
var MF_UNCHECKED = 0x00000000;
var MF_CHECKED = 0x00000008;
var MF_STRING = 0x00000000;
var MF_POPUP = 0x00000010;
var MF_RIGHTJUSTIFY = 0x00004000;

// custom popup menu should always reponse to left-click
// This sample is more complex, because use fb2k's context menu manager to display system context menu

function on_mouse_lbtn_down(x, y) {
    var _context = fb.CreateContextMenuManager();
    var _basemenu = window.CreatePopupMenu();
    var _child = window.CreatePopupMenu();
    var ret;

    // Please start index at 1, NOT 0
    _basemenu.AppendMenuItem(MF_STRING, 1, "item1");
    _basemenu.AppendMenuItem(MF_STRING, 2, "item2");
    _basemenu.AppendMenuItem(MF_STRING | MF_POPUP, _child.ID, "Now Playing");

    _context.InitNowPlaying();
    _context.BuildMenu(_child, 3, -1);

    ret = _basemenu.TrackPopupMenu(x, y);

    // Here is why start index should be 0
    if (ret == 0) return;

    // Execute!
    switch (ret) {
    case 1:
        fb.trace("Mmmm, you have choose item1, of course");
        break; // break is important, or it will exucte the following...
    case 2:
        fb.trace("Ok, item2 is clicked");
        break;

    default:
        _context.ExecuteByID(ret - 3);
        fb.trace(ret.toString());
        break;
    }

    _basemenu.Dispose();
}


I think I get the logic of the thing. 2 questions I have though are:

a) Is there any way to have the menu appear in the same place no matter where I click on the wsh panel? Ie if I always want to appear below the button rather than centered on the mouseclick?
b) In windows 7/vista theres a bar at the side of the menu where icons can appear (eg cut/paste icons). Is there any way to specify those icons for each item?

WSH Panel Mod

Reply #908
a) Is there any way to have the menu appear in the same place no matter where I click on the wsh panel? Ie if I always want to appear below the button rather than centered on the mouseclick?
Replace x and y in the following piece of code with the bottom left corner coordinates of the button.
Code: [Select]
ret = _basemenu.TrackPopupMenu(x, y);

b) In windows 7/vista theres a bar at the side of the menu where icons can appear (eg cut/paste icons). Is there any way to specify those icons for each item?
No.

WSH Panel Mod

Reply #909
a) Is there any way to have the menu appear in the same place no matter where I click on the wsh panel? Ie if I always want to appear below the button rather than centered on the mouseclick?

In this line:
Code: [Select]
ret = _basemenu.TrackPopupMenu(x, y);
Replace x and y with the absolute x and y coordinates of where you want the upper left corner of the popup menu to appear.

b) In windows 7/vista theres a bar at the side of the menu where icons can appear (eg cut/paste icons). Is there any way to specify those icons for each item?

I don't believe that this is possible.

WSH Panel Mod

Reply #910
Ok. Thanks guys.

WSH Panel Mod

Reply #911
WSH Panel Mod 1.3.5 uploaded, no major changes.

WSH Panel Mod

Reply #912
Hi everyone, i have a question

I'm a noob with javascript but since i found out about wsh panel i've been trying to understand it a little bit.
I'm working on a last fm stats script at the moment but there's one thing that i cant figure out.

The code how i want it is working fine so far, but when i start my foobar the script window wont show text but only images and rectangles.
When i open the properties or configure window and i hit ok the text shows up.

I found out that when i use DrawString instead of gdiDrawText it sometimes shows up when i launch foobar.

i found this in interfaces.txt
void DrawString(str, IGdiFont, color, x, y, w, h, flags = 0);
VBArray GdiDrawText(str, IGdiFont, color, x, y, w, h, format = 0); // Always faster than DrawString and returns chars drawed

For other scripts gdiDrawText is just working fine on startup. What could be the reason of this weird behavior and how can i fix this?

WSH Panel Mod

Reply #913
fixed it  found someone else in this topic posting something about window width and height in the function on_size. that was my problem

WSH Panel Mod

Reply #914
WSH Panel Mod v1.3.6 is released.
Changelog
Code: [Select]
- ADD: Sample "LoadImageAsync.txt".
- FIX: Better handling for mainmenu commands in fb.RunMainMenuCommand().
- CHG: Edge style can be used with pseudo transparent now.
- CHG: Improved pseudo transparent handling while in a tab splitter.


EDIT:
I've just fix a bug addressed that fb.RunMainMenuCommand() may not work
Please download the new one.


WSH Panel Mod

Reply #915
Hello,
Is it possible to create kind of automatic playlist or search with WSH Panel?
I mean fb.RunMainMenuCommand("Library/Search") shows me the search component. But I need to set a predefined search query at example.
Maybe there is another way.
Basically I've got a textfile that I like to read via script, then build a searchquery out of the textfile values and load it into foobar2000 search.
I found no way after reading the docs back and forth.

Any Idea?

WSH Panel Mod

Reply #916
Is it possible to create kind of automatic playlist or search with WSH Panel?


I think I will try foo_httpcontrol to query library this might be a workaround...



WSH Panel Mod

Reply #919
Hi, and thanks for this great component!

I'm new to wsh, and I've already learned the basics.  However, there are some things that I cannot do.

For example, I would like to create a simple panel to quickly change the state of the ReplayGain source mode (none, track or album).  I know how to call the ReplayGain menu items from wsh to change the source mode, but I would like to show in the panel what source mode is currently selected.  As far as I know, there is no way to inspect the variable holding the current source mode setting.  Have I missed something?

I have also tried to modify the MainMenuManager sample script to display only the "Playback / Replay gain / Source mode" sub-menu, but without success.  Is it possible to use fb.CreateMainMenuManager() to display an existing sub-menu?  How?

I have also a suggestion.  It would be nice if the wsh editor could be more independent of the main f2k window.  Currently, to test if a modified script works as expected, you have to close the editor, and when you reopen it, you have to find again the line you were editing.  That's terribly frustrating.  The Apply button works well, but it can only be used to watch changes in the panel display.  There is no way to actually use the panel or change the currently playing track without closing the editor.

Thanks for your good job anyway!

WSH Panel Mod

Reply #920
hello,
is it possible to add artist and title tags dynamic?
In my case I load a file from http:// without any tags, but I've got artist/title from onlineressource (kind of playlist).
how can I add these tags dynamic to file to display it in playlist and make it available to audioscrobbler at example?
while the file is online I can't modify it with MetaSet("artist", var.from.online.source); or similar.
Is there any other way?
thanks m.

WSH Panel Mod

Reply #921
@ T.P Wang:

There is a minor bug in the last update of UpdateFileInfoSimple: it does seem to write multivalue tags twice: firstly as a single tag (for example "a; b; c"), secondly as a split tag (for example "a"; "b"; "c"). This is of course not a critical bug, but it would be nice if it could be fixed.

 

WSH Panel Mod

Reply #923
small grammar issue: initialized?

I disagree.  "initialised" is the correct spelling in "real English". ;-)

BTW, nobody can help me with my questions in post #920?

WSH Panel Mod

Reply #924
I disagree.  "initialised" is the correct spelling in "real English". ;-)
While "initliased" is a wrong spelling in "every English".
Full-quoting makes you scroll past the same junk over and over.