|Jan 27, 2013, 08:43 AM||#1|
[AppleScript] Check what application is running in the foreground
I want to write an AppleScript that will force-quit the application running in the fore-ground (i.e the application in the status bar).
How can I use AppleScript to determine what that application is?
27" Sandy Bridge iMac; 13" 2012 MacBook Air; iPhone 5
In a world of without walls and fences, who needs Windows and Gates?
|Jan 27, 2013, 02:16 PM||#3|
Just expanding on what bumper314 has posted.
tell application "System Events" set frontmostApp to name of application processes whose frontmost is true tell application frontmostApp quit end tell end tell
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Applescript how to check radio button||redwgaontoy||Mac Programming||1||Jun 18, 2013 09:35 AM|
|AppleScript modification: Check if event already exist||bibyfok||Mac Programming||0||Dec 4, 2012 05:03 AM|
|Anyone know of an Applescript to check if an app is NOT running?||amityweb||Mac Programming||1||Oct 18, 2012 03:42 PM|
|AppleScript Application||MacGeekJunior||Mac Programming||2||Sep 2, 2012 03:12 PM|
|Applescript application not working within Automator||Jeshua||Mac Programming||0||Aug 3, 2012 07:41 PM|
All times are GMT -5. The time now is 02:29 PM.