• 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
make new as alias
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make new as alias


  • Subject: make new as alias
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 15 Oct 2009 09:57:07 -0500

Yesterday, I said ...
I've also noticed that 'make new ...' seems not to return an alias. I was under the impression that it did, but I've found that I now have to put '... as alias' after the 'make new ...' command to make scripts work right. Has something changed or is my memory defective? I will look further into this.

My memory is defective. I used this script, with notes, to run some tests.

tell application "Finder"
set x to (make new folder at desktop with properties {name:"TEST-FOLDER"}) -- as alias
set varType to (class of x) as text
try
set objType to (class of item x) as text
on error
set objType to "error"
end try
display dialog varType & ", " & objType
end tell

-- with 'as alias', displays "alias, folder" in 10.4.11, 10.5 and 10.6.
-- comment out 'as alias', then ...
--
-- in 10.5.8, displays "folder, error". Should display "?, folder"
-- in 10.6.1, displays "folder, error". Should display "?, folder"
-- in 10.4.11, displays "folder, error". Should display "?, folder"

Notice that 'x' is NOT a folder, but a pointer of some kind to a folder. So, what is the 'class of x'? I am unable to determine this when 'as alias' is commented out. Something seems to be wrong, here.

But what?

 _______________________________________________
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: make new as alias
      • From: "Stockly, Ed" <email@hidden>
  • Prev by Date: Re: content of selection
  • Next by Date: Re: AS apps in sidebar don't accept drag and drop input in SL
  • Previous by thread: Re: content of selection
  • Next by thread: Re: make new as alias
  • Index(es):
    • Date
    • Thread