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

WSH Panel Mod

Reply #875
@T.P Wang

Feature Request:

Rendering with GDI is very slow on my system. (ATI HD 3850) ...and consumes a lot of CPU-Power.

Direct2D has better performance and is Hardware-accelerated. (Firefox and IE change from GDI to Direct2D in next versions ( http://basschouten.com/ ))

Is it possible to use Direct2D additionally to GDI+ in WSH Panel mod?

Lit.: http://en.wikipedia.org/wiki/Direct2D

Thanks!


@T.P Wang

I second that Feature Request!

I use title animations on my script over the cover image and when in full screen view it takes too much cpu to work smoothly.

If Direct2D is possible to add, then please BIG PLEASE consider it!!! THANKS.

WSH Panel Mod

Reply #876
@T.P Wang:

If I open a tooltip (computer running win7) it automatically disappears after about 5 seconds, before I call IFbTooltip.Deactivate(). Is there any way to stop this behaviour?

WSH Panel Mod

Reply #877
I wonder if there will be some new function like $showpanel just as that in PSS~~~that will make me abandon PSS 4ever~~
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #878
Code: [Select]
    function RGBA(r, g, b, a) {
return ((a << 24) | (r << 16) | (g << 8) | (b));
}

function on_paint(gr) {
   
    gr.FillGradRect(0, 0, ww/2, wh, 0, RGBA(0, 0, 0, 255), RGBA(0, 0, 0, 0));
   
    gr.FillGradRect(ww/2, 0, ww/2, wh, 180, RGBA(0, 0, 0, 255), RGBA(0, 0, 0, 0));

}
function on_size() {

    ww = window.Width;
    wh = window.Height;
   
   
    }


There is still problem with the FillGradRect. This code draws black line in the middle when you drag the window size.

Is it possible to make FillGradRect like in Panel Stack Splitter ?

$gradientrect (x, y, w, h, r1-g1-b1-a1, r2-g2-b2-a2, OPTIONS, peak_point)


With the peak point we can adjust the gradient and no more black line problem. 

WSH Panel Mod

Reply #879
Is there a decent introduction tutorial on how to use this panel? I figure most of it is learning jscript, but is there a crib sheet for foobar specific stuff?

 

WSH Panel Mod

Reply #880
Documentation is provided when you download the WSH panel including interfaces and callbacks description, some helpers functions and samples you can study.

Here you can find how to use JScript and language specific things.
http://msdn.microsoft.com/en-us/library/hbxc2t98(VS.85).aspx


WSH Panel Mod

Reply #881
Is there a decent introduction tutorial on how to use this panel? I figure most of it is learning jscript, but is there a crib sheet for foobar specific stuff?


I started scripting with WSH a few days ago, and what really helped me was the given documentation and sample scripts.
You can find them on the google code page : http://code.google.com/p/foo-wsh-panel-mod...Fstate%3Dclosed

WSH Panel Mod

Reply #882
1.3.4 Uploaded.
Code: [Select]
v1.3.4
- ADD: New parameter "focus" to IGdiGraphics.FillGradRect().
- ADD: GetDelayTime() and SetDelayTime() methods to IFbTooltip interface.
- FIX: UpdateFileInfoSimple() won't work when supply multivalue fields.


WSH Panel Mod

Reply #884

Thousand thanx T.P for the "focus" parameter! 

WSH Panel Mod

Reply #885
1.3.4 : plain line problem still here on FillGradRect()

but it appear now where it didn't before



i use :
gr.FillGradRect(pad_x+box_width, wh-12+pad_y, box_width-5, 15, 90, RGBA(000,000,000,000), RGBA(250,250,250,055));

if i change the height value 15 by 16, its ok :

gr.FillGradRect(pad_x+box_width, wh-12+pad_y, box_width-5, 16, 90, RGBA(000,000,000,000), RGBA(250,250,250,055));

HTH

WSH Panel Mod

Reply #886
@Falstaff:
Oh, sorry for that, I forgot to mention, I've removed the problematic workaround for FillGradRect(), because it's not working as expected (reported by ExtremeHunter, if gradient area is large enough), it's a weird glitch in GDI+,  or maybe I should not use GDI+ in this function.

WSH Panel Mod

Reply #887
My odd question again~
fb.PlayingPlaylist seemed not to be updated to void when I stop playing tracks~i expected that it should be refreshed in on_playlist_switch(){},but, was not....
need i use on_playback_stop(){}or anything else?
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #888
@Falstaff:
Oh, sorry for that, I forgot to mention, I've removed the problematic workaround for FillGradRect(), because it's not working as expected (reported by ExtremeHunter, if gradient area is large enough), it's a weird glitch in GDI+,  or maybe I should not use GDI+ in this function.


it's fine for me, just a report for you

i've fixed this change in my config.

WSH Panel Mod

Reply #889
Documentation is provided when you download the WSH panel including interfaces and callbacks description, some helpers functions and samples you can study.

Here you can find how to use JScript and language specific things.
http://msdn.microsoft.com/en-us/library/hbxc2t98(VS.85).aspx


I started scripting with WSH a few days ago, and what really helped me was the given documentation and sample scripts.
You can find them on the google code page : http://code.google.com/p/foo-wsh-panel-mod...Fstate%3Dclosed


Thanks to both of you.

WSH Panel Mod

Reply #890
Direct2D support would be nice but I think foobar2000 as a whole needs to implement it rather than a single component.

WSH Panel Mod

Reply #891
1.3.4 Uploaded.
Code: [Select]
v1.3.4
- ADD: New parameter "focus" to IGdiGraphics.FillGradRect().
- ADD: GetDelayTime() and SetDelayTime() methods to IFbTooltip interface.
- FIX: UpdateFileInfoSimple() won't work when supply multivalue fields.

Thanks for the update, but UpdateFileInfoSimple() still doesn't work as expected. It doesn't give any errors anymore, but these tree rows of code now do exactly the same:
Code: [Select]
cmetadb.UpdateFileInfoSimple("COMMENT", "test 1;test 2", "COMMENT");
cmetadb.UpdateFileInfoSimple("COMMENT", "test 1;test 2", "");
cmetadb.UpdateFileInfoSimple("COMMENT", "test 1;test 2");
One would expect that the second row of code would make the content of COMMENT "test 1;test 2" (one single value), while all these rows result in COMMENT being "test 1"; "test2" (two separate values).

WSH Panel Mod

Reply #892
Direct2D wont do any good for WSH Panels Mod unless the JavaScript engine is swapped out with something faster like V8.
Currently the speed of JS execution is limiting performance here now. not the renderer.
Granted some operations are dead slow in GDI/GDI+ (especially fullscreen rendering) but in general the JS speed is the bottleneck. Especially if you attempt crazy animations and even 3D (yes some render 3D in JavaScript, 3D software rasterizers are very common and a nice programming exercise for many).

WSH Panel Mod

Reply #893
@Harm:
I'll look into it, thanks for reporting.

WSH Panel Mod

Reply #894
I've set up a fedora system, and planed running foobar under wine. After i unchecked safe mode, applied the skin "xchange",  at first moment the Objects which use wsh panel showed up and then turned to "Script Error", in meanwhile some familiar wsh panel errer boxes popped up. In console they're identical:

 
Code: [Select]
Error: WSH Panel Mod (GUID: F430759F-4E5C-4E96-8ADB-8F76B82AC9C2): Microsoft JScript runtime error:
Automation server can't create object

It's related to the phrase  "fso = new ActiveXObject(Scripting.FileSystemObject)" in wsh panel script. I've managed to install IE7 for activex and wsh5.6.

Could someone help me?

WSH Panel Mod

Reply #895
Is it possible to create a basic spectrum analyzer with WSH? I checked the docs, but didn't have any luck.

WSH Panel Mod

Reply #896
Is it possible to create a basic spectrum analyzer with WSH? I checked the docs, but didn't have any luck.

certainly impossible....though the WSH could create animation, the parameters related with the spectrum did not exist.
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #897
certainly impossible

Certainly not. The filename is available, so the panel could "just" load the file itself and decode it to generate a visualisation. Hence this solution would be convoluted and cause serious overhead. In total it would be easier to just write a custom visualisation UI element/panel which uses the "default" way.

WSH Panel Mod

Reply #898
there is an anime panel in Xchange~
mad messy misanthropist morbid mused

WSH Panel Mod

Reply #899
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.