Fast Forward and Rewind in Music App.
Title
Fast Forward and Rewind in Music App.
What do you expect to happen when you run the script/macro?
I want to be able to rewind (or fast forward) audio that is playing back in the Music App.
Are you seeing an error?
What happens when you run this script?
Nothing happens other than the app coming into focus. There is literally one command which is to press the F9 key, but it's not working.
A single click of the F9 key will skip to the next song, but I want to press down and hold the F9 key down as this is what invokes the rewind/fast forward with audio.
How were you running this script?
I clicked the "Run Script" or "Run Macro" button in SoundFlow
How important is this issue to you?
5
Details
{ "inputExpected": "I want to be able to rewind (or fast forward) audio that is playing back in the Music App.", "inputIsError": false, "inputWhatHappens": "Nothing happens other than the app coming into focus. There is literally one command which is to press the F9 key, but it's not working.\n\nA single click of the F9 key will skip to the next song, but I want to press down and hold the F9 key down as this is what invokes the rewind/fast forward with audio.", "inputHowRun": { "key": "-MpfwYA4I6GGlXgvp5j1", "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow" }, "inputImportance": 5, "inputTitle": "Fast Forward and Rewind in Music App." }
Source
//Macro converted to script
sf.ui.app('com.apple.Music').appActivate();
sf.ui.app('com.apple.Music').appActivateMainWindow();
sf.keyboard.press({
keys: "f9",
fast: false,
});
Links
User UID: iUxcnXnOj1O3TNTnRJxOjLRX8Hu2
Feedback Key: sffeedback:iUxcnXnOj1O3TNTnRJxOjLRX8Hu2:-ONvTz3oO1yVY8Q-WH8_
Feedback ZIP: wRA4bOd0DiPs+KZRc3Ptm7zyWd0jlSBUPu1Pa69Hp0EeEqdULHYj2qXJqMjA8K7P7IOg/eNOXtkix5RhcujSTAMkwVZnmMLoMGp/bKHO0uOi1PT1VeqcAKIR1EIXCKaonpu0rG7wakW6RbZopFMQ1RrkbSDlYfKHPOCRd5rTx1Gp5qekl54t11QS9NH/md0t2jsbhN8K8tViNQV7bec6boc1/qviYQuQh5Gh2nvN/LFvTteEw5hOkX7Ij9CyncUrWfGw6vc4bIjcDUWeUl4X4azBIGJKTloo79ZHAayJEERIIqSEYkXGHQG09kZaWJbEn4FfmI+j2nljY8TSj2kj1g==
- Kitch Membery @Kitch2025-04-16 00:35:53.049Z
Here are two individual scripts for controlling fast forward and rewind in Apple Music App...
Fast Forward
sf.system.execAppleScript({ script: `tell application "Music" to set player position to (player position + 15)` });
Rewind
sf.system.execAppleScript({ script: `tell application "Music" if player position > 15 then set player position to (player position - 15) else set player position to 0 end if end tell` });
- CIn reply toCarl.Glanville⬆:Carl Glanville @Carl.Glanville
This makes the app focused but does not cause the playing song to either ski pro the next or perform the fast wind. Were you able to get this working on your system?
C
- CCarl Glanville @Carl.Glanville
the skip forward skip back 15 seconds work totally fine though! I think the issue might be trying to get the F9 (fwd) or F7 (rew) key to stay depressed so that the audio skips forward or back for as long as the button is held down. The other option is to press and hold down the UI element the is the Next and Previous buttons up in the transport section of the interface - I was not able to get that to happen. Does Soundflow have the functionality to "press and hold" a keyboard key? I'm aware that I can obviously just use the F7 and F9 keys on my actual keyboard to achieve what I want rather than programming it to a Stream Deck, but there are other situations where "press and hold" would be a cool thing to be able to do outside of the Music app. I thought the Music app might be the easiest place to test that feature, but seeing as it's Apple, maybe not!
C
Kitch Membery @Kitch2025-04-16 21:36:08.043Z
The functionality for holding down a button, or repeating an action until a button is released is not easily implemented in SoundFlow right now, but if this is something you're interested in seeing in SoundFlow be sure to post this suggestion in the Ideas section of the forum, that way, it will be logged for consideration in future versions of SoundFlow.
Just a quick note for the future... Be sure to use the “Reply” button on the specific message you’re responding to, rather than the one at the top of the thread. That way, the person you’re replying to will get a notification. :-)
- CCarl Glanville @Carl.Glanville
THanks, Kitch. I'll drop a request in the Ideas Section.
C
- In reply toKitch⬆:
Christian Scheuer @chrscheuer2025-04-18 02:59:02.178Z
We have the Generic Button Command template that can be used to implement different actions based on key down/up: