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: [Not my release] foo_uie_panel_splitter (Read 408455 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Not my release] foo_uie_panel_splitter

Reply #375
Does anybody know a way to make a press of a button change the value of tag to a value stored in a variable (for example %tag%)? I'm looking for a way to do this without being limited to a fixed list of values (in that case I could use quicktag). Any suggestion?


In PSS at the moment, no. (see falstaff´s last post above  ) You have to use a track info mod panel or (more convenient but also more complicated) a wsh panel mod.


I've played a bit with track info mod, but that has way to many issues and I don't feel like spending too much time to learn to use wsh panel mod (indeed: too complicated), so I tried another thing using masstagger scripts, but I don't seem to be able to execute them from a button. I have made a script called 'Ta01' and I've tried all kind commands:

CONTEXT:Tagging/Scipts/Ta01
CONTEXT:'Tagging/Scipts/Ta01'
CONTEXT:Tagging/Scipts:Ta01
CONTEXT:'Tagging/Scipts:Ta01'
CONTEXT:Scipts/Ta01
CONTEXT:'Scipts/Ta01'

None of them seem to work... What am I doing wrong? Or is this just not possible?

[Not my release] foo_uie_panel_splitter

Reply #376
It is currently not possible to update tags from within pss.
You will have to use Trackinfo mod or WSH panel mod for this purpose.
Or create a button in columns ui button toolbar.

[Not my release] foo_uie_panel_splitter

Reply #377
CONTEXT:Tagging/Scipts/Ta01
CONTEXT:'Tagging/Scipts/Ta01'
CONTEXT:Tagging/Scipts:Ta01
CONTEXT:'Tagging/Scipts:Ta01'
CONTEXT:Scipts/Ta01
CONTEXT:'Scipts/Ta01'

None of them seem to work... What am I doing wrong? Or is this just not possible?


did you write 'Scipts' (not ScRipts ?)

the first one should be ok, BUT:

some if not all Context commands are only available when playing not when stopped.

And: some of them (like run service) are defenitely not possible in PSS

[Not my release] foo_uie_panel_splitter

Reply #378
did you write 'Scipts' (not ScRipts ?)


Oops... but no... I did write 'scripts', only in my previous post I made a mistake before I used copy and paste...

[Not my release] foo_uie_panel_splitter

Reply #379
I again have a little problem.

I tried to switch panels, resize the window and set a global variable with a button.

This was the code (sample):
Code: [Select]
// GLOBAL
$init_ps_global(panel.switch,0)

// SHOWPANEL
$showpanel_c(panel1,$ifequal(%panel.switch%,1,1,0))
$showpanel_c(panel2,$ifequal(%panel.switch%,2,1,0))

// BUTTONS
$ifequal(%panel.switch%,1,
$textbutton(10,5,50,12,PANEL1,PANEL1,SETGLOBAL:panel.switch:0;WINDOWSIZE:384:236;REFRESH,fontcolor:191-228-255,fontcolor:255-0-0)
,
$textbutton(10,5,50,12,PANEL1,PANEL1,SETGLOBAL:panel.switch:1;WINDOWSIZE:384:576;REFRESH,fontcolor:63-100-127,fontcolor:191-228-255)
)

$ifequal(%panel.switch%,2,
$textbutton(80,5,50,12,PANEL2,PANEL2,SETGLOBAL:panel.switch:0;WINDOWSIZE:384:236;REFRESH,fontcolor:191-228-255,fontcolor:255-0-0)
,
$textbutton(80,5,50,12,PANEL2,PANEL2,SETGLOBAL:panel.switch:2;WINDOWSIZE:384:576;REFRESH,fontcolor:63-100-127,fontcolor:191-228-255)
)

But it doesn't works as intended...
The first button works, but it only resizes the window and i have to click twice to show the panel too.
The second button works to switch the panel2 on/off, but doesn't resize...
Where's my fault? 

[Not my release] foo_uie_panel_splitter

Reply #380
hmm, strange this should be working...

I had a similar code with problems (some panels doing the correct thing while others do not although controlled by the same global variable).

I think the refresh command is not synchronized correctly

OR: You can try if this also happens if you leave the button after having clicked (and before you click again). I experienced that things having to do with a complete refresh are only executed after mouse-over-off.

[Not my release] foo_uie_panel_splitter

Reply #381
Without WINDOWSIZE i can switch panels without problems, so i guess WINDOWSIZE causes the issue.
I'll have to go another way then... 
Wanted to "recreate" my compact mode to return to the last opened panel when switching to it from the normal mode, but will have to stick on my old way now.

[Not my release] foo_uie_panel_splitter

Reply #382
seems to be a PSS issue, the WINDOWSIZE is not taken in consideration if another command is joined in the same button.

you can fix the pb by doubling the button like this:

Code: [Select]
// GLOBAL
$init_ps_global(panel.switch,0)

// SHOWPANEL
$showpanel_c(panel1,$ifequal(%panel.switch%,1,1,0))
$showpanel_c(panel2,$ifequal(%panel.switch%,2,1,0))

// BUTTONS
$ifequal(%panel.switch%,1,
$textbutton(10,5,50,12,PANEL1,PANEL1,SETGLOBAL:panel.switch:0;REFRESH,fontcolor:191-228-255,fontcolor:255-0-0)
$textbutton(10,5,50,12,PANEL1,PANEL1,WINDOWSIZE:384:236;REFRESH,fontcolor:191-228-255,fontcolor:255-0-0)
,
$textbutton(10,5,50,12,PANEL1,PANEL1,SETGLOBAL:panel.switch:1;REFRESH,fontcolor:63-100-127,fontcolor:191-228-255)
$textbutton(10,5,50,12,PANEL1,PANEL1,WINDOWSIZE:384:576;REFRESH,fontcolor:63-100-127,fontcolor:191-228-255)
)

$ifequal(%panel.switch%,2,
$textbutton(80,5,50,12,PANEL2,PANEL2,SETGLOBAL:panel.switch:0;REFRESH,fontcolor:191-228-255,fontcolor:255-0-0)
$textbutton(80,5,50,12,PANEL2,PANEL2,WINDOWSIZE:384:236;REFRESH,fontcolor:191-228-255,fontcolor:255-0-0)
,
$textbutton(80,5,50,12,PANEL2,PANEL2,SETGLOBAL:panel.switch:2;REFRESH,fontcolor:63-100-127,fontcolor:191-228-255)
$textbutton(80,5,50,12,PANEL2,PANEL2,WINDOWSIZE:384:576;REFRESH,fontcolor:63-100-127,fontcolor:191-228-255)
)

[Not my release] foo_uie_panel_splitter

Reply #383
tedgo:
your code seems to be correct.
I will change implementation around SETGLOBAL,WINDOWSIZE, REFRESH, a little.
This behavior mgiht be fixed in next release.
(Although WINDOWSIZE is not officially available.)


And, it is hard to reply for each request.
so, summary of replies for requests and questions is the following.
(1) Write tag functionality will be implemented in the next release.
(2) The problem that some context commands such as Run service are not executed, will be fixed in the next release.
(3) content of %ps_foobar2000_path% will be changed.
(4) other problems are pending(deferred).


[Not my release] foo_uie_panel_splitter

Reply #384
Hmm, just wanted to make a button to add the highlighted track to the Playback Queue.

I made a small PS with this button inside. The Title Format Code on Startup is set to "Follow Cursor", but each time I press the button, the song playing is added to the playback queue instead of the one highlighted (I thought that 'follow cursor' means that all code is related to the things highlighted. wrong?)


anybody got an idea for this? or can clarify, if I got something wrong?

[Not my release] foo_uie_panel_splitter

Reply #385
tedgo:
your code seems to be correct.
I will change implementation around SETGLOBAL,WINDOWSIZE, REFRESH, a little.
This behavior mgiht be fixed in next release.
(Although WINDOWSIZE is not officially available.)


And, it is hard to reply for each request.
so, summary of replies for requests and questions is the following.
(1) Write tag functionality will be implemented in the next release.
(2) The problem that some context commands such as Run service are not executed, will be fixed in the next release.
(3) content of %ps_foobar2000_path% will be changed.
(4) other problems are pending(deferred).


what a very, very very good news for the points 1,2 & 3 

can't wait

Thanx a lot for trying to add these functions to PSS, keep the good work !

[Not my release] foo_uie_panel_splitter

Reply #386
yeah, great news!

actually oversaw ssenna´s good-news post in this flood of posts here 

[Not my release] foo_uie_panel_splitter

Reply #387
@Falstaff
Thanks for this suggestion
I'll try it immediately

@ssenna
Thanks for your answer and of course for your effort in improving your great plugin
But as you said "Although WINDOWSIZE is not officially available", i hope it will still be available in PSS.
Deleting this button-option would kill my compact mode... 

[Not my release] foo_uie_panel_splitter

Reply #388
v0.3.7.2a just released !!! so fast Ssenna, thank you, i have to test now all these great adds

    *  added: writing tag featue with button function.(SETTAG and SETDELTATAG.)
      SETDELTATAG: When content of the tag is a numerical value, the content value is added the specified delta value.
    * changed:target tracks of contextmenu commands via button function are switched according to tfmode(nowplaying/follow cursor)
    * fixed: some contextmenu commands via button function were not executed.(perhaps)
    * fixed: %ps_foobar2000_path% points to foobar2000 install folder.

[Not my release] foo_uie_panel_splitter

Reply #389
Wow, thank you ssenna

[Not my release] foo_uie_panel_splitter

Reply #390
"fixed: %ps_foobar2000_path% points to foobar2000 install folder. "

it's wrong, not fixed at all, it points to the folder where foo_uie_panel_splitter.dll is stored (this what i obtain when i display it ==>  C:\Program Files\foobar2000\components), not the foobar2000 install folder

could you check this again Ssenna please ?

EDIT: tested SETTAG, it works fine here, now what i need to make a perfect rating system in PSS is an evolution of the $imagebutton() function to allow us to only use a part of an imagebutton as the sensitive area
maybe a $imagebutton_rc() new function ???

example to illustrate what i need (as Track info mod/PUI provided)  :

images used are like this :
star1.png = '*----'
star2.png = '**---'
star3.png = '***--'
star4.png = '****-'
star5.png = '*****'

code for the rating system should be :
$imagebutton_rc($get(rate.x),$get(rate.y),0,0,12,12,$get(img)'/rating/set'$get(no.set)'/star'%rating%'.png',$get(img)'/rating/set'$get(no.set)'/star1.png',SETTAG:rating:1;REFRESH,)
$imagebutton_rc($get(rate.x),$get(rate.y),12,0,12,12,$get(img)'/rating/set'$get(no.set)'/star'%rating%'.png',$get(img)'/rating/set'$get(no.set)'/star2.png',SETTAG:rating:2;REFRESH,)
$imagebutton_rc($get(rate.x),$get(rate.y),24,0,12,12,$get(img)'/rating/set'$get(no.set)'/star'%rating%'.png',$get(img)'/rating/set'$get(no.set)'/star3.png',SETTAG:rating:3;REFRESH,)
$imagebutton_rc($get(rate.x),$get(rate.y),36,0,12,12,$get(img)'/rating/set'$get(no.set)'/star'%rating%'.png',$get(img)'/rating/set'$get(no.set)'/star4.png',SETTAG:rating:4;REFRESH,)
$imagebutton_rc($get(rate.x),$get(rate.y),48,0,12,12,$get(img)'/rating/set'$get(no.set)'/star'%rating%'.png',$get(img)'/rating/set'$get(no.set)'/star5.png',SETTAG:rating:5;REFRESH,)

only the part of the image that begin from 0 to the value (x,y) in blue is sensible as a button... do you see what i mean ? just check about Track Info Mod to see how $button() function works in it, see below :

$button(DstX,DstY,X,Y,W,H,IMAGE,HOVER IMAGE,COMMAND,OPTIONS)
DstX & DstY
    The position of the top-left corner of the button image or button text.
X, Y, W(idth) & H(eight)
    X an Y define the position of the upper left corner of the button relative to that of the text or image's top-left corner, W and H define the width and height of the button.


btw, SETTAG is already a really big improvement, thanx again!

[Not my release] foo_uie_panel_splitter

Reply #391
v0.3.7.3 released,

but sorry not good yet, the %ps_foobar2000_path% point to the /components folder, even if the .dll is in another subfolder (mine is stored in /components/adds)

so i think i must store the .dll file in the /components folder to get it works ... i'll do

[Not my release] foo_uie_panel_splitter

Reply #392
No, now %ps_foobar2000_path% points to the foobar2000 installation folder.
It seems that it points to the directory of the directory of the dll

@ssenna
Thanks for this update
But what is %ps_track_state% for?

[Not my release] foo_uie_panel_splitter

Reply #393
Great additions, thanks ssenna

Run Service commands don't seem to work though:

$textbutton(10,10,30,10,****,****,CONTEXT:'Playback Statistics/Rating/4',fontcolor:0-0-0,fontcolor:0-0-192) -> WORKS
$textbutton(10,10,30,10,Discogs,Discogs,CONTEXT:'Discogs/Write Tags...',fontcolor:0-0-0,fontcolor:0-0-192) -> WORKS
$textbutton(10,10,30,10,wiki,wiki,CONTEXT:'Run service/LyricWiki - Artist',fontcolor:0-0-0,fontcolor:0-0-192) -> DOESN'T WORK

[Not my release] foo_uie_panel_splitter

Reply #394
GREAT!

button commands follow tfmode(nowplaying/follow cursor): Works!
CONTEXT:Run service: Works!!!!!!


THANKS      SOOO      MUCH        SSENNA !!   

[Not my release] foo_uie_panel_splitter

Reply #395
Run Service commands don't seem to work though:


it works. For me after let´s say 20 clicks it suddenly worked (up to now)
... maybe that was meant with "(perhaps)" in the cangelog 

edit: or just try the first entry in your Run service list (at least this was the last change I made, before it worked)

[Not my release] foo_uie_panel_splitter

Reply #396
@ssenna
It still seems that all button images in the same splitter gets refreshed once the mouse is moved over one of them, which causes this annoying flickering. Could you please fix it?
Thanks

[Not my release] foo_uie_panel_splitter

Reply #397
I have a request for $imageabs option called repeat. It will repeat image till end, not stretch.

[Not my release] foo_uie_panel_splitter

Reply #398
rol
Interesting idea
A possibility to create objects (not only images but drawrect, drawroundrect etc.) and call them with $repeat would be indeed a good idea.

[Not my release] foo_uie_panel_splitter

Reply #399
And I forgot, another request for %ps_playback_order%.