This is something I used to do in Keyboard Maestro all the time and I'd like to know how to do it in SF.
I get this is how to bring Pro Tools into focus:
sf.ui.proTools.appActivateMainWindow();
and I can do the same with Finder:
sf.ui.finder.appActivateMainWindow();
But I'd like to do the same with UAD console (or any other app for that matter) but I don't see it in the pre-defined list of commands. In my head it would look like this:
sf.ui.Console.appActivateMainWindow();
but that doesn't work. Is it possible to do in SF?
Thanks in advance!
- Christian Scheuer @chrscheuer2019-09-18 09:19:13.953Z
Hi @Graham_Archer.
Yes this is possible in SoundFlow.
The easiest way to get the Javascript code for this would be to use the Macro Editor.Your steps:
- Create a new Macro by pressing "+ New" and choose "Macro".
- Click the "Add Action" button, search for the "Activate App's Main Window" action and click to add it.
- In the "Application" property, select the App you want to activate.
Now you have a macro that does this.
If you want to convert this action to Javascript, click the three small dots, and choose Copy as Javascript.
Now you can paste the code into a Script command.- GGraham Archer @Graham_Archer
Hey @chrscheuer thanks so much for this answer. I've tried this as a macro and also as script, it works but SF is flagging an error message and I'm not sure why. I have:
sf.ui.app('com.uaudio.console').appActivateMainWindow();
and the error I'm getting is:
"Script error at line 2
Could not find Main Window UI for Application with b..."I can't see all of the message unfortunately! In fact on the script I'm using, there isn't even a line 2. I'm a bit puzzled as to why it's being flagged - any ideas?
Christian Scheuer @chrscheuer2019-09-18 09:51:29.233Z
Hi @Graham_Archer.
Try using the
appActivate
action instead:sf.ui.app('com.uaudio.console').appActivate();
- GGraham Archer @Graham_Archer
That works perfectly! Thank you!
- JIn reply toGraham_Archer⬆:Jeremiah Moore @Jeremiah_Moore
Hi all - reviving this with a specific question: Activating an app only seems to work if the app is already launched.
How do we activate the app including launching it if it's not already launched?
Basic functionality wanted is: you push the "soundminer" button, you get soundminer, whether it's launched yet or not.
- JJeremiah Moore @Jeremiah_Moore
Note to any users seeking similar answer: There is a command called "Launch Application" which acts in the manner desired.