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: Playlist attributes - stop after current, AND repeat track toggle (Read 3178 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Playlist attributes - stop after current, AND repeat track toggle

So once again, I'm looking to implement a feature that I can't imagine is very common.

I'm using foo_playlist_attributes, which works great for what I need (random vs. default on different playlists).  But what I need now is this:  To have a playlist attribute be set on "stop after current", but still have the option to toggle repeat on and off for the current track - ideally using buttons for ease & speed of access (read: idiot-proofing).

Is there a possibility for building a macro button that will disable 'stop after current' as well as change my playlist order to 'repeat track' in one click?  Or something else that would work that I'm missing?

Thanks in advance!

Playlist attributes - stop after current, AND repeat track toggle

Reply #1
This should be possible with an AutoHotkey script.

Playlist attributes - stop after current, AND repeat track toggle

Reply #2
This should be possible with an AutoHotkey script.

Hmm - any newbesque resources you can point me towards on how to set that up?  I'll start searching, but I'm still new at this . . . 

 

Playlist attributes - stop after current, AND repeat track toggle

Reply #3
So I installed autohotkey, and I've started digging into the help file to figure out how to do what I'm looking for . . .


yikes.

Playlist attributes - stop after current, AND repeat track toggle

Reply #4
you have to simulate keystrokes to open the preferences window and navigate to the playlist attributes settings. Then use something like "Control, ChooseString, valueToSelect, ComboBox1" to adjust the values in the comboBoxes. I have written a script to change the output Device this way so I think the same thing should be possible with playlist attributes. Depending on the speed of your computer you might see the prefereces window popup for some ms everytime you run the script.
If you want to have only one button to toggle your settings you first have to read the values of the comboboxes, then set them to the other value.

Here is my script for the output device, use it as inspiration:
Code: [Select]
foobarAhk :="ahk_class {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}"
IfWinExist, %foobarAhk%
ControlSend,ahk_parent,j
    WinWait, foobar2000 ahk_class #32770 ;wait for the Preferences Window

    ControlSend,SysTreeView321, o
    Control, ChooseString, Creative Soundblaster, ComboBox1
    ControlSend, , {ENTER}

If you want to run the script via toolbar button you might need the foo_run component. I don't know if there is another way to execute applications via button.

Edit: maybe forget the heavy scripting. Just assign keyboard shortcuts to change playlist attributes values, then use autohotkey to fire these hotkeys. This way you don't have to do anything with the preferences window.

Playlist attributes - stop after current, AND repeat track toggle

Reply #5
Hi everyone - I wanted to address this again . . .  any ideas other than setting up something with autohotkey?  Again, I need playlists to be set for 'stop after current', but still be able to toggle 'repeat (track)' on or off with a single click.

I'm looking for something that's totally idiot-proof (multiple employees using the same computer/player), and can be easily set up on a new player via instructions remotely.

Playlist attributes - stop after current, AND repeat track toggle

Reply #6
So I found a combination that "works", but probably isn't going to last long-term because of it's confusion.  Basically, I unchecked the "Reset when stopping" box in the Preferences>Playback section.  Then using foo_playlist_attributes I set the default playback order to repeat (track) on the playlist I want to toggle repeat on/off.  Then added 2 new buttons that turn stop after current on & off - but labelled them repeat on & off.

So this "works", but a problem arises when I switch to a playlist that I never want to have repeat (it plays random, no exceptions).  Because if the turn off repeat button I've created (i.e. stop after current enable) is hit while on that playlist, it throws a wrench in the works.  And in a high-pressure situation, it's not easy to figure out that the button that says repeat (but hover text says disable) is the one you want to hit to reinstate random play.

umm, make sense? 

So yeah, still looking for ideas for a better way to implement this feature.