How could I use AppleScript code to close the window named "About this Mac" (A propos de ce Mac in French). I need an AppleScript for this because I use Dragon Dictate 3 commands. I am handicapped and I don't manage to use any keyboard or mouse. Only Voice and edited commands.

I tried Command+W shortcut but it didn't work for this window. It works for all other Finder windows except this one.

  • I tried this code but it doesn't work...set _dictateApp to (name of current application) tell application "Finder" close front window end tell – Claude Bernay Jun 22 '13 at 16:00
  • That's weird, Command + W works here. – duci9y Jun 22 '13 at 16:36
  • On my mac it doesnt because the window is not selected, inactive. I need to click on it to use Command W. – Claude Bernay Jun 22 '13 at 16:42
  • Oh yeah… sorry. Here's a tip. The About My Mac window is managed by the process loginwindow. I don't know if this piece of info helps, but if it does, tell me. – duci9y Jun 22 '13 at 17:25
  • Ok could you give me an example because I am a very beginner of using applescript. Thanks ? – Claude Bernay Jun 22 '13 at 18:12

The window is shown by the loginwindow process, and you can close it by clicking the close button:

tell application "System Events" to tell process "loginwindow"
    click button 1 of window 1 -- or window "About This Mac"
end tell

close window 1 didn't work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .