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: How to force sorting in PanelsUI by command? (Read 3299 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to force sorting in PanelsUI by command?

I'm new to foobar and currently trying to do some coding in PanelsUI. I wonder if it is possible to force sorting with a command (something like $sort) a instead of implementing a button or using the menu (i.e. after selecting a different track in a playlist)? I searched the documentation and the forum, but found only strings for formatting. Thanks in advance for your help!

How to force sorting in PanelsUI by command?

Reply #1
Can't somebody tell me how to sort in a PanelsUI script without using a button? Must be either trivial or unpossible. Or is there a workaround? I want to do a formatting in SCPL followed by a resorting, because only the active row is formatted and not the hole table.

How to force sorting in PanelsUI by command?

Reply #2
What?

screenshot please?
elevatorladylevitateme

How to force sorting in PanelsUI by command?

Reply #3
Thank you for answering shakey_snake.

Ok, I have to explain a bit more. When you got your Playlist in SCPL and you click on a track it gets selected. This is reported by %_selected% and can be used for formatting purposes. In this case ony the selected row is updated and all the other rows stay the same. But I want to redraw the hole Playlist after selecting a track and thought, the easiest way would be to resort. I know that the sorting feature is implemented with $buttons and I am asking if there is an additional way to trigger sorting, in my case after selection of a track. I can't find the answer in the documentation or in the forums. Would be nice if there is a solution.

How to force sorting in PanelsUI by command?

Reply #4
that is currently not possible, sorry.
elevatorladylevitateme

How to force sorting in PanelsUI by command?

Reply #5
If it's not possible, then I've got a more general question, since I'm new to Foorbar and only fetched a part of it's possibilities.

There are lots of commands accessible from the menu, like 'Play', 'Pause', all the edit stuff, and the sorting features. And the 'Panels Dropdown Menu' is full of commands (or is it only for informational purposes?). There must be a way to use them in the code. How will I do this? Only in the COMMAND field of a button?

And at last here is an other beginners question:
Are the buttons "Global", "Background", "PerTrack", and "PerSecond" in the Panels configuration window in any way functional? I don't see a difference when I use them, or have I missed something? And the markers "// PerTrack" etc. are they still not functional in SCPL? And is there a special order in the use of the redraw type or can I shuffle them as I like to?

How to force sorting in PanelsUI by command?

Reply #6
If it's not possible, then I've got a more general question, since I'm new to Foorbar and only fetched a part of it's possibilities.

There are lots of commands accessible from the menu, like 'Play', 'Pause', all the edit stuff, and the sorting features. And the 'Panels Dropdown Menu' is full of commands (or is it only for informational purposes?). There must be a way to use them in the code. How will I do this? Only in the COMMAND field of a button?

Correct. They are there as a reference to make for easy copying into your code.
And at last here is an other beginners question:
Are the buttons "Global", "Background", "PerTrack", and "PerSecond" in the Panels configuration window in any way functional? I don't see a difference when I use them, or have I missed something?
You are not missing anything. They are not functional.

And the markers "// PerTrack" etc. are they still not functional in SCPL? And is there a special order in the use of the redraw type or can I shuffle them as I like to?
They are not functional in SCPL.
SCPL is drawn while scrolling. Selected and deselected items are redraw on mouse click, and the current playing song is redrawn every second.
elevatorladylevitateme

How to force sorting in PanelsUI by command?

Reply #7
Thank you again shakey_snake. Then I have to do a different way.