• 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: Easier way to check for numbered string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Easier way to check for numbered string


  • Subject: Re: Easier way to check for numbered string
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 27 Apr 2007 08:52:18 -0700

On Apr 27, 2007, at 8:36 AM, Chris Tangora wrote:

It works fine, but it has to go through three separate "try's" for each file. I was hoping to condense it down to a single if / then, but am having trouble. This is what I have so far, but it doesn't work.

Why does it have to go through three separate tries? If all you're checking for is the first two characters, where do the other two tries come into play?


Anyway, I think this will do it for you:

try
text 1 through 2 of file_name as integer
beep
on error
display alert "Not an integer."
-- handle error as appropriate; the alert is there as a place holder.
end try


-- Michelle

--
"You can fool some of the people all of the time and those are the ones you want to concentrate on."
- George W. Bush at the Gridiron Dinner, Washington, DC March 31, 2001


_______________________________________________
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: Easier way to check for numbered string
      • From: Chris Tangora <email@hidden>
    • Re: Easier way to check for numbered string
      • From: Chris Tangora <email@hidden>
References: 
 >Easier way to check for numbered string (From: Chris Tangora <email@hidden>)

  • Prev by Date: Easier way to check for numbered string
  • Next by Date: Re: Easier way to check for numbered string
  • Previous by thread: Easier way to check for numbered string
  • Next by thread: Re: Easier way to check for numbered string
  • Index(es):
    • Date
    • Thread