Hello,
I apologise in advance for this simple question. I’ve searched on the forum and can’t find an answer. Is there a way to deactivate an application.
This little snippit of code activates “Font Book”
tell application "Font Book"
activate
end tell
Is there an equivalent way to telling it to ‘deactivate’?
For some reason I’ve never been able to find a comprehensive list of keywords and commands for Applescript.
Thanks in advance.
Hello northernstar,
activating an application in AppleScript means to launch it (if necessary) and bring it to the foreground,
by setting its frontmost property to true, all other applications will be “deactivated” automatically.
To hide an application according to the command in the application’s menu
you can use
tell application "System Events" to tell process "myApplication" to set visible to false
Hi, northernstar, StefanK
Or use launch, which (should) launch the app but not bring it to the frontmost.
tell application "Font Book"
launch
end tell