How create a script to close any app.
Is there an availble command for closing pro tools or a basic one that can point at any application? I tried to create a toggle button, but I think i'd honestly prefer a button specific for closing pro tools, any other app as well
- Christian Scheuer @chrscheuer2021-11-16 14:27:01.725Z
Hi Chip,
We're getting an easy to use "Quit Application" action in the upcoming version of SoundFlow, but for now you can automate this by accessing the menu of the app in question. There's a lot of examples of this in the forum already :)
But maybe that's not what you meant?
- CChip Williams @Chip_Williams
That's exactly what i'm looking for. When i searched I found the posts about the scripts for creating toggle buttons. i also just anticipated finding the command already somewhere as a macro.
- In reply tochrscheuer⬆:CChip Williams @Chip_Williams
So here's what I found - use the exisiting macro - Click Menu Item, Then just point it at the app and menu entries and there ya go. Will work for any app, and then the script convert helps us non-coders understand what that looks like in script.
- In reply tochrscheuer⬆:CChip Williams @Chip_Williams
This is it for PT:
sf.ui.proTools.menuClick({
menuPath: ["Pro Tools","Quit Pro Tools | Ultimate"],
});