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: Shuffle button (Read 1167 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Shuffle button

Anyone has any idea how I could implement this? Looking for a visual indicative that I can click to turn shuffle on/off, rather than using keyboard shortcuts (as I won't remember if it's enabled or not).

Re: Shuffle button

Reply #1
I use this code snippet for a shuffle text button. It cycles through various kinds of shuffle modes. See if this works for you.

Code: [Select]
$font(tahoma,9,bold)
$puts(pb_order.action,COMMAND:Playback/Order/Cycle Forward)

$puts(pb_order.txt,
$if($strstr(%ps_playback_order%,Default),$upper(Normal),
$if($strstr(%ps_playback_order%,Random),$upper(Random),
$if($strstr(%ps_playback_order%,Repeat '('track')'),$upper(Repeat),
$if($strstr(%ps_playback_order%,Repeat '('playlist')'),$upper(Repeat PL),
$if($strstr(%ps_playback_order%,Shuffle '('albums')'),$upper(Shuffle A),
$if($strstr(%ps_playback_order%,Shuffle '('folders')'),$upper(Shuffle F),
$if($strstr(%ps_playback_order%,Shuffle '('tracks')'),$upper(Shuffle),
))))))))

$textbutton(x,y,w,h,$get(pb_order.txt),$get(pb_order.txt),$get(pb_order.action);%_REFRESH%,fontcolor:255-255-255 left,fontcolor:153-204-255 left)

Re: Shuffle button

Reply #2
^You might mention the component you are using (panel stack splitter) and the the fact it requires Columns UI.

The easiest way for both default UI and columns is using the playback order toolbar. Just right click any other toolbar to enable.

Re: Shuffle button

Reply #3
Sorry for the late response. I gave this a go when it was posted and failed, and tried now and failed again. I add a Panel Stack Splitter, with nothing stacked on it, and on the script part I have to paste that, yeah? Well I pasted it on Script > PerTrack and Script > PerSecond but the panel stack remains empty, and clicking it doesn't seem to affect anything. And yes, I use Columns UI.

Re: Shuffle button

Reply #4
Did you change the x,y,w,h values in the $textbutton( function?

Re: Shuffle button

Reply #5
Oh, no, I didn't see that. I tried changing all those values just now and I still don't see anything appear though. Is there any other value I should change? For example I don't have "pb_order.txt"

Re: Shuffle button

Reply #6
Yes you have, $puts sets a variable value and $get retrieves that value.
If nothing works the least you should see is text unless you set the coordinates too far off. Also, fontcolor is 255-255-255 which is white so if your background is white too you won't see it.
No need to put this on Per Second script tab, there's no use to update the script per second. PerTrack is correct.