Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Applescript to open when closed, close when open
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Slokunshialgo" data-source="post: 653133" data-attributes="member: 21869"><p>I recently installed Mira, which lets me run commands/apps/applescripts by a press of a button on the remote. What I want to do here is set up a simple applescript to check if an app is open, and if it is, close it, but if it's closed, open.</p><p></p><p>So, basically, the sort of syntax in a C-style language:</p><p></p><p>[code]if (app.opened() == false)</p><p> app.open();</p><p>else</p><p> app.close();[/code]</p><p></p><p>Can anybody shed some light on how to do this? I've been googling it for a bit, cand cannot come across much to see if an app is open or not.</p></blockquote><p></p>
[QUOTE="Slokunshialgo, post: 653133, member: 21869"] I recently installed Mira, which lets me run commands/apps/applescripts by a press of a button on the remote. What I want to do here is set up a simple applescript to check if an app is open, and if it is, close it, but if it's closed, open. So, basically, the sort of syntax in a C-style language: [code]if (app.opened() == false) app.open(); else app.close();[/code] Can anybody shed some light on how to do this? I've been googling it for a bit, cand cannot come across much to see if an app is open or not. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Applescript to open when closed, close when open
Top