• 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 trap if item cannot be made into an integer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error trap if item cannot be made into an integer?


  • Subject: Re: Error trap if item cannot be made into an integer?
  • From: Greg Robb <email@hidden>
  • Date: Tue, 19 Nov 2002 09:25:59 -0800

Opps, put the "Try" before the "set i as real" to trap the strings

set thelist to {1.3, 4, "name"}
repeat with i in thelist
try
set i to i as real -- without this OMM in OS 8.6, this script fails
i as integer
on error m number n
display dialog {n, return & m} as string
end try
end repeat
_______________________________________________
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.

  • Prev by Date: Re: Aliases in paths not resolved....????
  • Next by Date: Re: RegEx & Concordances
  • Previous by thread: Re: Error trap if item cannot be made into an integer?
  • Next by thread: Re: Error trap if item cannot be made into an integer?
  • Index(es):
    • Date
    • Thread