• 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: Optimizing Character Matching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimizing Character Matching


  • Subject: Re: Optimizing Character Matching
  • From: Tim Mansour <email@hidden>
  • Date: Sat, 4 Nov 2006 16:20:30 +1100


On 04/11/2006, at 11:55 am, Rick Gordon wrote:

          tell character 1 of pStyleName
            if it contains " " or it contains "-" or it contains "_" or it contains "<" or it contains ">" or it contains "(" or it contains ")" or it contains "*" or it contains "*" or it contains "~" then
              set tempName to (characters 2 thru -1 of pStyleName as text)
            end if
          end tell

I'd be testing the other way round for this Rick:

if " -_<>()*~" contains (character 1 of pStyleName) then set tempName to ...

And having said that, I agree with Gary that you could save yourself a lot of effort with the Satimage scripting addition--or TextCommands which is Unicode aware:

<http://www.satimage.fr/software/en/downloads.html>
<http://osaxen.com/files/textcommands1.0.1.html>


-- 
Tim Mansour <email@hidden>



 _______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Optimizing Character Matching
      • From: Rick Gordon <email@hidden>
References: 
 >Optimizing Character Matching (From: Rick Gordon <email@hidden>)

  • Prev by Date: Re: Auto Start FileMaker and open file?
  • Next by Date: Re: Auto Start FileMaker and open file?
  • Previous by thread: Re: Optimizing Character Matching
  • Next by thread: Re: Optimizing Character Matching
  • Index(es):
    • Date
    • Thread