• 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: POSIX path with osascript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POSIX path with osascript


  • Subject: Re: POSIX path with osascript
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 29 Jan 2010 12:48:56 -0800

On Jan 27, 2010, at 1:48 PM, Luther Fuller wrote:

On Jan 27, 2010, at 3:02 PM, Jay Louvion wrote:
on run argv
   tell application "Finder"
       try
           set AliasList to {}
           set FolderPath to item 1 of argv
           repeat with FileName in (items 2 thru end of argv)
               set FileAlias to (POSIX path of FolderPath as text) & "/" & FileName as string as alias
               set AliasList to AliasList & FileAlias
           end repeat

It seems that 'argv' is a list whose 1st item is a folder path and whose remaining items are the names of files it contains. Is the 1st item a posix path or a colon delimited path or an alias? I will presume that it's an alias.

You presume incorrectly.  Strictly speaking, items of argv aren't even POSIX paths, they're just text.  (Which might happen to be valid POSIX paths, but they might not, which is why it doesn't try to automatically turn them into alias objects.)


--Chris Nebel
AppleScript Engineering

PS: open(1) may be of some use to you here.  I frequently use it from Terminal to open directories in Finder.
 _______________________________________________
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: 
 >POSIX path with osascript (From: Jay Louvion <email@hidden>)
 >Re: POSIX path with osascript (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Open a linked jpeg in Photoshop instead of the browser itself
  • Next by Date: Re: How to test if a Mail folder exists?
  • Previous by thread: Re: POSIX path with osascript
  • Next by thread: Re: POSIX path with osascript
  • Index(es):
    • Date
    • Thread