|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#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?
|
|
|
|
0
|
|
|
#2 |
|
Code:
tell application "System Events" processes whose frontmost is true end |
|
|
|
1
|
|
|
#3 |
|
Just expanding on what bumper314 has posted.
Code:
tell application "System Events" set frontmostApp to name of application processes whose frontmost is true tell application frontmostApp quit end tell end tell Regards Mark |
|
|
|
1
|
![]() |
|
| Tags |
| applescript |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 12:05 AM.







Linear Mode
