PDA

View Full Version : applescript...simple question




aaagat111
Feb 14, 2008, 04:12 PM
I want to write applescript code that will simply just close the active window, basically performing the apple + w command.


can anyone tell me how to do this.

Thank you very much

-Alex



kainjow
Feb 14, 2008, 04:31 PM
Try this:

tell application "System Events" to set app_name to name
of the first process whose frontmost is true
tell application app_name to close front window