Re: Handler defies logic
Re: Handler defies logic
- Subject: Re: Handler defies logic
- From: Michelle Steiner <email@hidden>
- Date: Thu, 25 Sep 2003 08:47:45 -0700
On Thursday, September 25, 2003, at 06:26 AM, Rich Carroll wrote:
What am I missing? Thanks in advance for your help.
This will do it:
property validChars : ,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890" as
Unicode text
global folderDescript
global txt
on run
validateFolderDescript("")
end run
on validateFolderDescript(folderDescript)
set txt to (text returned of (display dialog "Enter main ,
folder description.
Maximum of 24 alphanumeric characters." default answer ,
"myJobFolder")) as string
set chars to count txt
if chars is greater than 24 then
display dialog "Maximum of 24 characters"
validateFolderDescript("") of me
end if
repeat with i in txt
if i is in validChars then
set folderDescript to folderDescript & i
else
display dialog "\"" & i & "\"" & " is a bad character.,
You may only use numbers or letters"
validateFolderDescript("") of me
end if
end repeat
set folderDescript to "_" & folderDescript
end validateFolderDescript
--Michelle
--
Are you better off today than you were on Jan 20th, 2001?
_______________________________________________
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.