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

Re: Strange Error


  • Subject: Re: Strange Error
  • From: "email@hidden" <email@hidden>
  • Date: Thu, 20 Jan 2011 11:23:02 -0800


But why do the script editors not error on the erroneous code?
It would not have wasted time wi

It errored out for me on SE and SD.

I suggest you use this method of error trapping:

on error errText
 
or 

on error errText number errNum

That will give you more information in tracking down errors (although not too helpful in this case)
ES
-----------------

property applsAlias : (path to applications folder)
tell application "Finder"
set itemList to (items of applsAlias) as alias list
end tell
repeat with i from 1 to (count items of itemList)
POSIX path of (item i of itemList)
set item i of itemList to the result
end repeat
-- itemList is now a list of posix paths
repeat with i from 1 to (count items of itemList)
set applPosixPath to (item i of itemList)
try
set itemAlias to (POSIX file applPosixPath) as alias
set item i of itemList to itemAlias
on error errText
display dialog "error: " & return & return & errText
end try
end repeat
beep
delay 1

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

 _______________________________________________
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: 
 >Strange Error (From: Luther Fuller <email@hidden>)
 >Re: Strange Error (From: Luther Fuller <email@hidden>)
 >Re: Strange Error (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Strange Error
  • Next by Date: Finder event question - scripting bridge, appscript
  • Previous by thread: Re: Strange Error
  • Next by thread: Finder event question - scripting bridge, appscript
  • Index(es):
    • Date
    • Thread