• 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: Problem with extracting characters from a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with extracting characters from a string


  • Subject: Re: Problem with extracting characters from a string
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 16 Dec 2004 04:38:14 -0600

At 15:58 +0530 12/16/2004, BADRINATH, NANDINI wrought:

    Have a problem with Applescripting. I have the filename which is
stored as a string. How do I extract the filename as alphabets? Is there
a way to access the array elements?
______________________________________________________________________

 set fName to "test"
 set split to characters of fName

 --> {"t", "e", "s", "t"}

~~~~~

 set AppleScript's text item delimiters to {""}
 set fName to "test"
 set split to text items of fName

 --> {"t", "e", "s", "t"}

~~~~~

Using the Satimage osax:

set fName to "test"
set split to find text "." in fName with regexp, all occurrences and string result without case sensitive


 --> {"t", "e", "s", "t"}

(http://www.satimage.fr/software/en/downloads_osaxen.html)


Chris


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Problem with extracting characters from a string
  • Next by Date: Re: Problem with extracting characters from a string
  • Previous by thread: Re: Problem with extracting characters from a string
  • Next by thread: Excel2004, System Events & NSReceiverEvaluationScriptError
  • Index(es):
    • Date
    • Thread