Skip to main content

Topic: WSH Panel Mod (Read 578559 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1425
false bug report, to delete.

  • Last Edit: 20 October, 2012, 10:46:04 AM by Falstaff

  • Elevory
  • [*]
WSH Panel Mod
Reply #1426
Is there a way to get a group of items based on a tag? I wrote a script to automatically keep track of album ratings for Columns UI, but it's quite slow. See for yourself:
Code: [Select]
//Automatic Album Rating by Elevory
function UpdateAlbumRating() {
    var albumTracks = new Array();
    var albumTrackCount = 0;
    var ratingSum = 0;
    
    items = plman.GetPlaylistItems(plman.PlayingPlaylist);
    for (i = 0; i < items.count; i++) {
        if (g_album.EvalWithMetadb(items.item(i)) == g_album.EvalWithMetadb(g_metadb)) {
           albumTracks.push(items.item(i));
           if (g_tfo.EvalWithMetadb(items.item(i)) > 0) {
              ratingSum = ratingSum + parseInt(g_tfo.EvalWithMetadb(items.item(i)));
              albumTrackCount += 1;
           }
          
        }
    }
    
    for (i = 0; i < albumTracks.length; i++) {
        //plman.SetPlaylistSelection(plman.PlaylingPlaylist, albumTracks[i], 0)
        fb.RunContextCommandWithMetadb("Rate Album "+(Math.round(ratingSum / albumTrackCount)), albumTracks[i], 8);
    }
}


Also, it relies on Custom DB context menu entries. Is it possible to modify a field without having to access the context menu?

I appreciate the help.

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1427
Do i miss something or no callback is activated on playlist rename ? souldn't it be on_playlist_changed ?? for now nothing happens

i need it and according to me it should be added if not already available ... thanx by advance


EDIT: my bad, i've used "on_playlist_changed()" that doesn't exist instead of "on_playlists_changed()"
  • Last Edit: 23 October, 2012, 03:46:23 PM by Falstaff

  • neothe0ne
  • [*][*][*][*]
WSH Panel Mod
Reply #1428
Is it a known bug that the Menu-generating script doesn't always populate all the menu items for "View"?  Sometimes I get only "Always on Top / Visualizations > / Popup panels >", other times I get the full list which includes "GEP control / Console / Equalizer / .."etc.

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1429
%cpu increase problem with script engine Jscript9 when moving mouse

no problem with script engine set to Jscript, but with Jscript9, %cpu reach abnormal values (between 6 or 15% on my 6 physical core intel recent CPU, instead of 0 ore 1% normally) when i move the move quickly over the panel, even if the on_mouse_move() function is empty !!!

NB: note that if i remove the function on_mouse_move() from the script, the problem disappear.

i use windows 8 x64, i don't know if it happens on windows Seven, but i repeat: it only happens with Jscript9, not with Jscript engine...

could you check that point T.P please ?

Thanx by advance

*waits*

  • derty2
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1430
> Is it a known bug that the Menu-generating script doesn't always populate all the menu items for "View"?
> Sometimes I get only "Always on Top / Visualizations > / Popup panels >",
> other times I get the full list which includes "GEP control / Console / Equalizer / .."etc.


Yes I have noticed this behaviour too.
I have WSH buttons for all menu items and when I press "SHIFT"+"Click button: View" , it behaves as you say.
I just click again (and again) until it works.

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1431
many other weird crash, 2 panels crashed nearly synchronously, the 2 ones on a gdiDrawText method, and that make bad redraw on columnsUI toolbar too, but this time no freeze

Code: [Select]
Argument ou appel de proc├ędure incorrect
File: <main>
Ln: 81, Col: 9


v1.5.6 seems unstable for now ...

HTH


and since (only a few minutes, check my previous today post above) i turned all my WSH panel to engine Jscript instead of JScript9, weird synchronus crashes are back
so, please, don"t forget to check the code around your tooltips modifications in v1.5.6 too ... thanks

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1432
%cpu increase problem with script engine Jscript9 when moving mouse

no problem with script engine set to Jscript, but with Jscript9, %cpu reach abnormal values (between 6 or 15% on my 6 physical core intel recent CPU, instead of 0 ore 1% normally) when i move the move quickly over the panel, even if the on_mouse_move() function is empty !!!

NB: note that if i remove the function on_mouse_move() from the script, the problem disappear.

i use windows 8 x64, i don't know if it happens on windows Seven, but i repeat: it only happens with Jscript9, not with Jscript engine...

could you check that point T.P please ?

Thanx by advance

*waits*


tested on windows 7, no problem with Jscript9 engine ... windows 8 issue with Jscript9 ???

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1433
%cpu increase problem with script engine Jscript9 when moving mouse

no problem with script engine set to Jscript, but with Jscript9, %cpu reach abnormal values (between 6 or 15% on my 6 physical core intel recent CPU, instead of 0 ore 1% normally) when i move the move quickly over the panel, even if the on_mouse_move() function is empty !!!

NB: note that if i remove the function on_mouse_move() from the script, the problem disappear.

i use windows 8 x64, i don't know if it happens on windows Seven, but i repeat: it only happens with Jscript9, not with Jscript engine...

could you check that point T.P please ?

Thanx by advance

*waits*


nobody else has this problem with windows 8 and Jscript9 script engine ?

WSH Panel Mod
Reply #1434
Quote
nobody else has this problem with windows 8 and Jscript9 script engine ?


I can confirm, high cpu usage here too with JScript9 on Windows 8 x64

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1435
thanx, let's hope T.P could give an answer about this problem, and hopefully a solution/fix

EDIT: it looks like a repaint was done on every mouse move even if nothing is coded in the on_mouse_move() Callback. It the Callback it no present at all, no problem. Problem not happen on Seven.
  • Last Edit: 21 November, 2012, 07:09:24 AM by Falstaff

WSH Panel Mod
Reply #1436
Will removing the old WSH panel mod and installing the new one (in order to upgrade the version, the old one needs to be removed) mean that my WSH panel mod data is lost?

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1437
Will removing the old WSH panel mod and installing the new one (in order to upgrade the version, the old one needs to be removed) mean that my WSH panel mod data is lost?


no. wsh scripts are stored in the configuration files (folder foobar2000/configuration), replacing the component will not loose data and scripts.
  • Last Edit: 21 November, 2012, 01:25:13 PM by Falstaff

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1438
Will removing the old WSH panel mod and installing the new one (in order to upgrade the version, the old one needs to be removed) mean that my WSH panel mod data is lost?


you don't need to remove the old component. just upgrade through file>preferences>components.

IF you start foobar with the component removed, default UI would retain the scripts but columns UI would lose them all. assuming you're creating your own, you'd keep multiple backups anyway...

no. wsh scripts are stored in the configuration files (folder foobar2000/configuration), replacing the component will not loose data and scripts.


that's not quite right. only the settings from file>preferences>tools>wsh panel mod are stored there. your scripts are in theme.fth (default UI) or the columns ui.cfg file.

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1439
no. wsh scripts are stored in the configuration files (folder foobar2000/configuration), replacing the component will not loose data and scripts.


that's not quite right. only the settings from file>preferences>tools>wsh panel mod are stored there. your scripts are in theme.fth (default UI) or the columns ui.cfg file.


...and column ui.cfg is where if not in /configuration folder , but right, for DUI, it's not there.

  • Takaji
  • [*][*][*][*]
WSH Panel Mod
Reply #1440
I have a playback command toolbar with a seekbar being drawn in the on_paint function. There's a tooltip that shows up when I hover over the seekbar. When it hovers, the seekbar doesn't update until the tooltip disappears (moving the mouse off the toolbar). I've tried hooking into a bunch of callbacks but I couldn't figure out which one was the proper one, so I'm stumped.

Is there a way to keep the seekbar updated while the tooltip is activated?
Link to the toolbar code (I'm not the original author): https://gist.github.com/8f160fdd33c166d306ae

PS - Is there a way I can log to console?

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1441
i can't tell because tooltips are generally invoked from on_mouse_move and that script doesn't have it so it must be in one of the external files which are imported at the start.

use fb.trace(blah); to output stuff to the console - blah being a variable. you can of course output plain text if you wrap it in quotes.

  • Takaji
  • [*][*][*][*]
WSH Panel Mod
Reply #1442
i can't tell because tooltips are generally invoked from on_mouse_move and that script doesn't have it so it must be in one of the external files which are imported at the start.


I should've included buttons.js: https://gist.github.com/a8d1e1ffe3916411838c

I'll try doing some additional testing and see if I can resolve my issue. Thanks!

  • Takaji
  • [*][*][*][*]
WSH Panel Mod
Reply #1443
I tried turning tooltips on, but discovered that whenever a tooltip is shown, nothing else in the WSH panel will update: the progress bar stalls and play/pause doesn't switch icons.

Any suggestions?

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1444
I tried turning tooltips on, but discovered that whenever a tooltip is shown, nothing else in the WSH panel will update: the progress bar stalls and play/pause doesn't switch icons.


nope, i use tooltip in my playlist script and panel keeps refreshing as well.

Any suggestions?


sorry, no time to help you for the moment.

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1445
@T.P, i have a couple of feauture requests.

1 - can we have some way to reload a panel through a command. let's say i'm working on a background .js file. at the moment i have to restart foobar or open the editor and close it. it would be nice if i could invoke a command through the context menu or using window.NotifyOthers

2 - a command to clear the window properties would be great as well.

  • romka18
  • [*]
WSH Panel Mod
Reply #1446
also to T.P.:

it will be nice to see in next versions some function to add a track to specific playlist by its path
and, still need something to handle dsp and foo_convert with foo_fileop

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1447
@T.P, i'm having an issue with tracking tooltips. i've based a seekbar on your example and it works fine if on it's own in a panel. but if i want to integrate with something else that uses tooltips and i use the Deactivate() function, the tracking tooltip stops working.

is there some other code i need to use to make it start working again or is it a bug?


  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1448
bug reminder for T.P Wang

Quote
nobody else has this problem with windows 8 and Jscript9 script engine ?


I can confirm, high cpu usage here too with JScript9 on Windows 8 x64


on mouse move over a panel although nothing is coded in the on_mouse_move()) callback...

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1449
any news from you T.P ? is there any v1.6 coming soon ?

Keep your great work!