Re: Fwd: shell script how to get current window path
Re: Fwd: shell script how to get current window path
- Subject: Re: Fwd: shell script how to get current window path
- From: Skeeve <email@hidden>
- Date: Tue, 25 Nov 2008 09:49:44 +0100
Define the "current path". Define window 1? Window 1 of iTunes won't
help you. Do you mean Finder's front window? So the script has to be in
the folder the window is showing, right? Then you can use "path to me".
If you want to create a toolbar script, you can use
on run
tell application "Finder"
activate
try
set this_folder to (the target of the front window) as alias
on error
-- something has gone wrong. handle it here
end try
-- this_folder is now the folder you want
end tell
end run
Excerpt taken from Marc Liyanage's "Open Terminal Here". See
http://www.apple.com/applescript/macosx/toolbar_scripts/
for more information about toolbar scripts.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden