• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fwd: shell script how to get current window path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Fwd: shell script how to get current window path (From: "Quentin Arnault" <email@hidden>)

  • Prev by Date: Fwd: shell script how to get current window path
  • Next by Date: Re: shell script how to get current window path
  • Previous by thread: Fwd: shell script how to get current window path
  • Next by thread: Re: shell script how to get current window path
  • Index(es):
    • Date
    • Thread