Re: Easier way to check for numbered string
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