Skip to content

Instantly share code, notes, and snippets.

@ApprenticeGC
Created October 11, 2012 09:44
Show Gist options
  • Save ApprenticeGC/3871308 to your computer and use it in GitHub Desktop.
Save ApprenticeGC/3871308 to your computer and use it in GitHub Desktop.
AppleScript 1-2-3 Chapter1
tell application "Finder" to close every window
tell application "Finder" to open the startup disk
tell application "Finder" to get the name of front Finder window
tell application "Finder" to close Finder window "Macintosh HD"
tell application "Finder" to get the index of Finder window "Macintosh HD"
tell application "Finder" to get the name of Finder Window 1
tell application "Finder" to get the name of Finder Window 2
tell application "Finder" to get the index of the front Finder window
tell application "Finder" to get the index of the back Finder window
tell application "Finder" to get the index of the last Finder window
tell application "Finder" to get the index of the Finder window before the last Finder window
tell application "Finder" to get the index of the Finder window after the front Finder window
tell application "Finder" to set the index of the last Finder window to 1
tell application "Finder" to
set the index of the first Finder window to
the index of the last Finder window
tell application "Finder" to get the target of the front window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment