• 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: finder selection question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finder selection question


  • Subject: Re: finder selection question
  • From: "Stockly, Ed" <email@hidden>
  • Date: Wed, 25 Jul 2007 12:35:49 -0700
  • Thread-topic: finder selection question

Bob,

Here is a very simple answer to your question.

This will only work if one file is selected. It also coerces the file type
to "alias" which is probably the most useful in apple script.

  tell application "Finder"
    set myFile to the selection
     set myFile to myFile as alias
end tell

HTH
ES

> I would like to do the following operation.
>
> 1. Select a file in the finder, not through AS but by simply a mouse   click.
>
> 2. Then Run a script that uses the previously selected item (above)    as its
target.
 _______________________________________________
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

  • Prev by Date: Re: AppleScript-Users Digest, Vol 4, Issue 344
  • Next by Date: Re: Strange char "?" in html source from Safari
  • Previous by thread: Re: finder selection question
  • Next by thread: Re: Strange char "?" in html source from Safari
  • Index(es):
    • Date
    • Thread