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

[Not my release] foo_uie_panel_splitter

Reply #450
@Ssenna: seems there is a problem with some drawing function (some imageabs, some imagebuttons...) when opening foobar by double-clicking some file associated with FB (I tried .mp3, .m3U, .pls). Most images/buttons don´t show up.

Tested it on 2 similar setup systems (Vista and XP).

Can anybody else check this, to be shure it´s not due to my setup of components?

[Not my release] foo_uie_panel_splitter

Reply #451
Its an old problem with relative paths.

Don't use "images\picture.png" but "%ps_foobar2000_path%\images\picture.png" instead and it will work.

[Not my release] foo_uie_panel_splitter

Reply #452
aha, ok..

(actually wondered, what this %ps_foobar2000_path% discussion was about)

[Not my release] foo_uie_panel_splitter

Reply #453
@Ssenna:

Hi,

I have a request about artreader_**** use ... f%path%, b%path% and r%path% don't work at all , that's really a lack in PSS, because i have no way to check if an image file is present or not (using $findfile) or to get the image width and height (using $getimagewidth and $getimageheight)

Could you think about this problem and hopefully find a solution? that would be so nice and useful for a large # of users (me first, sure )
btw, making f%path%, b%path% and r%path% working would do the job as well !

Regards,

Keep the good work, you rock !

[Not my release] foo_uie_panel_splitter

Reply #454
The only current way to check if an artreader image is present is this:
$if2($imageabs(3,3,$sub(%el_height%,8),$sub(%el_height%,8),%path%,artreader_front nodelay)
,
$imageabs(3,3,$sub(%el_height%,8),$sub(%el_height%,8),$get(alternative image),nodelay)
)

It works, but I'd prefer:
$puts(image,$if($findfile(%artreader_front%),%artreader_front%,$get(alternative image)))
$imageabs(3,3,$sub(%el_height%,8),$sub(%el_height%,8),$get(image),nodelay)

With fields (like %artreader%, %artreader_front%, %artreader_back% etc.) for the path instead of %path% and call artreader_*** as option it should be possible to use $getimagewidth() etc.

[Not my release] foo_uie_panel_splitter

Reply #455
thanx tedgo, the $if2($imageabs...,) works fine to display an alternative image if artreader*** image not present

but always need a way to get image width/height for artreader***

[Not my release] foo_uie_panel_splitter

Reply #456
I apologize if this has been mentioned before, I have been trying to keep on top of this topic but development has been very rapid lately. I have a bit of a problem I am trying to work around and would like to ask for any input before I go and spew off yet another feature request.

So here is the situation, I have a PSS panel as a child of another PSS panel. Within the child panel I have several $imagebutton() that use $ps_get_global() for their positions. I use $imagebutton() with SETGLOBAL and REFRESH on the master panel to adjust that $ps_get_global(). If I put the child $imagebutton() in the PerTrack tab, the buttons only update on track change despite the REFRESH. If I put the $imagebutton() in PerSecond tab the buttons do not get drawn at all.  I also placed a $drawtext() with $ps_get_global() and can confirm it is being updated from the master panel.

Does the REFRESH command ignore child panels? Can $imagebutton() be used on PerSecond? Is there any other approach I should explore to control the position of child panel elements from a master panel?

[Not my release] foo_uie_panel_splitter

Reply #457
had some similar problems to implement %playback_order% for PBO buttons...

Does the REFRESH command ignore child panels? - to my experience, yes.
Can $imagebutton() be used on PerSecond? - No
Is there any other approach I should explore to control the position of child panel elements from a master panel? - From the reasons above, I don´t think there are good workarounds, so I just try to avoid child panels. For me the only reason to use them is, if I need one for a different TF mode (now playing/follow cursor). 


[Not my release] foo_uie_panel_splitter

Reply #458
If this option will come into PSS i hope it can be chosen in the child panel, if it should be refreshed on every action in the main panel...
Otherwise child panels scripts that don't need to be effected by this would unneccessarily get refreshed every time.

EDIT:
Maybe a silly question, but what is this "evaluate scripts when trackinfo is modified" checkbox for?
I checked/unchecked it few times without any difference...

[Not my release] foo_uie_panel_splitter

Reply #459
a solution to refresh the child pss is to use $movepanel_c(child_pss,x,y,w,h) in the per track section of the parent, it will redraw the child at each REFRESH command initiated by a button or at each change track! a tweak is to change by one pixel the height of the child at each click button or track change if this is not enough to use same x,y,w,h+(0 or 1)

according to you, how my Xchange PSS config works ?

 

[Not my release] foo_uie_panel_splitter

Reply #460
well...

* $getimagewidth/height can work only after $imageabs.

$if($imageabs(0,0,,,%path%,artreader nodisplay),
//or  $if($imageabs(0,0,width,height,%path%,artreader nodisplay),
//file exists
$puts(w,$getimagewidth(a%path%))
,
//no file exists.
$puts(w,0)
)
$drawtext($get(w),0,0,100,100,0-0-0)
This code maybe works.

* I consider adding function to observe global varialbes
  (then, PerTrack or PerSecond scripts will be executed if the observed global variable is modifiyed.)
  However this will easily cause infinity-loop of execution scripts. so I have not decided whether to add.

* REFRESH effects only self-panel.

* "evaluate scripts when trackinfo is modified"  means that if you modify tag, PerTrack and PerSecond are executed.

[Not my release] foo_uie_panel_splitter

Reply #461
* $getimagewidth/height can work only after $imageabs.

$if($imageabs(0,0,,,%path%,artreader nodisplay),
//or  $if($imageabs(0,0,width,height,%path%,artreader nodisplay),
//file exists
$puts(w,$getimagewidth(a%path%))
,
//no file exists.
$puts(w,0)
)
$drawtext($get(w),0,0,100,100,0-0-0)
This code maybe works.

i'll try again, i hope it will work ... thanx for answer, i'll notice you of my results

* I consider adding function to observe global varialbes
  (then, PerTrack or PerSecond scripts will be executed if the observed global variable is modifiyed.)
  However this will easily cause infinity-loop of execution scripts. so I have not decided whether to add.

cool, if i understand, this will do the same thing as "evaluate scripts when trackinfo is modified", for but GLOBALs too, not only TAGs, when value changes?

* REFRESH effects only self-panel.

not a problem, we can deal with, people just need to understand well how PSS works to find easy solutions to get a clean refresh of child PSS

* "evaluate scripts when trackinfo is modified"  means that if you modify tag, PerTrack and PerSecond are executed.

thanx, i was not sure of what this option was made for, now i know

[Not my release] foo_uie_panel_splitter

Reply #462
* $getimagewidth/height can work only after $imageabs.

$if($imageabs(0,0,,,%path%,artreader nodisplay),
//or  $if($imageabs(0,0,width,height,%path%,artreader nodisplay),
//file exists
$puts(w,$getimagewidth(a%path%))
,
//no file exists.
$puts(w,0)
)
$drawtext($get(w),0,0,100,100,0-0-0)
This code maybe works.

i'll try again, i hope it will work ... thanx for answer, i'll notice you of my results



it works fine !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

big thanx Ssenna

[Not my release] foo_uie_panel_splitter

Reply #463
a solution to refresh the child pss is to use $movepanel_c(child_pss,x,y,w,h) in the per track section of the parent, it will redraw the child at each REFRESH command initiated by a button or at each change track! a tweak is to change by one pixel the height of the child at each click button or track change if this is not enough to use same x,y,w,h+(0 or 1)

I played around with this approach and while this will trigger the child panel as a whole to be redrawn it will not refresh the contents of the child panel. I can use buttons in the master panel to change global variables then use those variables to define the position of the child panel and the child panel moves if I use $movepanel_c() in either PerTrack or PerSecond.  The buttons drawn inside the child panel using the global variables for positioning do not get updated until the track change.

I suppose a short term solution would be to totally re-implement the contents of the child panel as subsections of the master panel but this will take some time to implement as I am buried several panels deep on a multitabbed autohiding, autosizing panel. It would be nice however if we had a REFRESHALL or some other way to forcably refresh everything accross all of PSS including child panels when certain conditions are met.

[Not my release] foo_uie_panel_splitter

Reply #464
Does $drawthemerect() not work in PSS? It's mentioned in the Read Me of PSS, but so far it only works for me in ELP, not PSS.

[Not my release] foo_uie_panel_splitter

Reply #465
Is it possible to make a stop button that changes appearance when stop after current is activated?

[Not my release] foo_uie_panel_splitter

Reply #466
if you trigger stop after current with a pps-button, you could set a global variable with this button



[Not my release] foo_uie_panel_splitter

Reply #467
I'm trying to display cover images in a rotation on a PSS.  I want to change the cover image every 5 secs.  I have this in the panel's Per Second script.

$if(%ps_isplaying%
,
  $ifequal($mod(%playback_time_seconds%,5),0
  ,
  <get new pic>
  <draw new pic>
  ,
  )
,
)

This sort of works.  Every 5 seconds, it displays the new pic for 1 sec then the pic disappears.  I have no code in Per Track.

If I do this instead

$if(%ps_isplaying%
,
  $ifequal($mod(%playback_time_seconds%,5),0
  ,
  <get new pic and store in global var cover.pic>
  ,
  )
  <draw %cover.pic% >
,
)

In other words, draw the picture every second and get new pic every 5 secs.  But that seems stupid to keep displaying the same thing every second.

what should I be doing instead?  thanks.

PS I know I can use foo_uie_albumart but I want to do my own drawing so I can have overlay and reflection etc.

[Not my release] foo_uie_panel_splitter

Reply #468
In other words, draw the picture every second and get new pic every 5 secs.  But that seems stupid to keep displaying the same thing every second.

what should I be doing instead?  thanks.

PS I know I can use foo_uie_albumart but I want to do my own drawing so I can have overlay and reflection etc.


I think using a 5 second timer ( or modulo ) in WSH panel is the only efficient way to do this if you dont want to call imageab ( in PSS ) every second.

Or maybe you can try reading the image into a var in Per Second and call imageab in Per track. ( check "evaluate scripts when track info in modified")
I dont know if this will work, but maybe u can give it a shot.

[Not my release] foo_uie_panel_splitter

Reply #469
I figured it out:

enable per second in the parent panel and resize the panel I want to update to zero then back to normal size.  this forces the panel to refresh the per track script, where I calculate and draw the new image.

$if(%ps_isplaying%,
$if($isvisible_c(leftPanel),
$ifequal($mod(%playback_time_seconds%,5),0,
  $movepanel_c(leftPanel,0,0,0,0)
  $movepanel_c(leftPanel,0,0,$get_ps_global(l.panel.w),$get_ps_global(l.panel.h))
,)
,)
,)

[Not my release] foo_uie_panel_splitter

Reply #470
@barty

cool if that works for you.
I think you can omit that "if(isplaying)" since Per Second is only executed when it's playing.

Peace

[Not my release] foo_uie_panel_splitter

Reply #471
is there a way to fetch the panel widths/height/left/top? 

like $getpanelwidth(panel caption)?

i know where to define them, but it would be useful for me to be able to use this type of syntax to retrieve them in the script to make the setup more easily editable.

i apologize if this is in an updated readme, but the old one i have doesn't contain this type of command as far as i could tell.

[Not my release] foo_uie_panel_splitter

Reply #472
Not that I'm aware of, but you can use the following workaround:

$set_ps_global(panel.width,%_width%)
$get_ps_global(panel.width)

[Not my release] foo_uie_panel_splitter

Reply #473
@qwertz

correct me if i am wrong
but isnt set_ps_global (and the like) only available under PSS and not any other panels?
If this is the case then wouldnt the code only work for getting width for PSS panels?
I may be wrong


@rubber soul

there's no function that can do that yet.
but if you use $movepanel_c(caption, x , y, w, h) to set dimensions for panel, then didnt u already have access to the widths/height/left/top? 


Peace

[Not my release] foo_uie_panel_splitter

Reply #474
i defined the panel sizes in the text fields under the panel list tab.  i think i will redo it so that the panels are defined in the script so that it is easier to change the panel sizes/location later.  thanks for the responses.