• 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: Error-trapping alias properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error-trapping alias properties


  • Subject: Re: Error-trapping alias properties
  • From: Andy Wylie <email@hidden>
  • Date: Sat, 30 Mar 2002 21:41:24 +1200

on 30/3/02 5:53 PM, Paul Berkowitz at email@hidden wrote:
> However, as Emmanuel said, 'fully resolving' by FIRST coercing the alias to
> string, then trying to coerce the string back to an alias, is what work:
;)
> try
> set theFile to contents of fileRef
> set filePath to theFile as string
> get alias filePath
> on error
> display dialog "You trashed the file."
> set theFile to choose file
> set fileRef to a reference to theFile
> end try
> That, at last, results in "You trashed the file" both on the same computer
> and also when moving the script to another computer, both in OS 10.1.3 and
> 9.2.2 (AS 1.8.2b3 on both).
>
> Thanks to all who contributed. A successful conclusion.

aw c'mon!, spot the difference...
------------------
property someFile : "excuse me"

try
(someFile as string) as alias
display dialog someFile as text
on error
set someFile to choose file with prompt "%0 isagonner-->" & (someFile)
end try

------------------

do you need the reference?
Can you confirm this will or not suffice?


_____________sighmon
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Error-trapping alias properties
      • From: Paul Berkowitz <email@hidden>
    • Re: Error-trapping alias properties
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Error-trapping alias properties (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Simple Printing Script
  • Next by Date: Re: Random Numbers (is new: Seeding)
  • Previous by thread: Re: Error-trapping alias properties
  • Next by thread: Re: Error-trapping alias properties
  • Index(es):
    • Date
    • Thread