• 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: alias or not an alias
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alias or not an alias


  • Subject: Re: alias or not an alias
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 29 Aug 2011 19:33:56 -0500

On Aug 29, 2011, at 18:34, Luther Fuller wrote:
I used a diagnostic to determine that contentsSource was indeed an alias, therefore it should work without error elsewhere in my script in a 'tell Finder' block. But it doesn't. So I added ...

... as alias

to the end of the line, above for no good reason. No more errors!

But the dictionary says that 'make new ...' returns an alias.
______________________________________________________________________

Hey Luther,

Where are you getting 'make new' and that it returns an alias?

The verb in the Finder is 'make'.  The result is a Finder reference and has been for as long as I can remember.

Script Debugger Dictionary Viewer:

make (verb)Make a new element (from Standard Suite)

 function syntax

set theResult to make new type class ¬
     at insertion location ¬
     to reference ¬
     with properties record

 result

reference to the new object(s)


set f to alias "Thor:Users:chris:test_directory:"
tell application "Finder"
set newFolder to make new folder at f with properties {name:"Test_Folder"}
end tell

--> folder "Test_Folder" of folder "test_directory" of folder "chris" of folder "Users" of startup disk of application "Finder"

I nearly always convert Finder references to aliases.  They're safer, ubiquitously accepted, and faster.

--
Best Regards,
Chris

 _______________________________________________
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

  • Follow-Ups:
    • Re: alias or not an alias
      • From: Luther Fuller <email@hidden>
References: 
 >alias or not an alias (From: Luther Fuller <email@hidden>)

  • Prev by Date: alias or not an alias
  • Next by Date: Re: alias or not an alias
  • Previous by thread: alias or not an alias
  • Next by thread: Re: alias or not an alias
  • Index(es):
    • Date
    • Thread