• 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: Handler defies logic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Handler defies logic
      • From: Rich Carroll <email@hidden>
References: 
 >Handler defies logic (From: Rich Carroll <email@hidden>)

  • Prev by Date: Can I script user input into a dialog?
  • Next by Date: Re: Handler defies logic
  • Previous by thread: Handler defies logic
  • Next by thread: Re: Handler defies logic
  • Index(es):
    • Date
    • Thread