Skip to content

Instantly share code, notes, and snippets.

@topfunky
Created August 24, 2012 18:17
Show Gist options
  • Save topfunky/3453841 to your computer and use it in GitHub Desktop.
Save topfunky/3453841 to your computer and use it in GitHub Desktop.
Make a new Finder window open to the same directory as the current one.
(*
Duplicate current Finder window
Author: Barry Els
Version: 1.1
*)
try
tell application "Finder"
set this_folder to (the target of the front window) as alias
set theTargetWindow to front window
set {x1, y1} to position of theTargetWindow
set {bx1, by1, bx2, by2} to bounds of theTargetWindow
set newWindow to make new Finder window to this_folder
tell newWindow
set bounds to {bx1, by1, bx2, by2}
set position to {x1 + 20, y1 + 20}
end tell
end tell
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment