• 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
Functionality of delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Functionality of delimiters


  • Subject: Functionality of delimiters
  • From: Jim Skibbie <email@hidden>
  • Date: Tue, 22 Jan 2008 18:31:51 -0600
  • Thread-topic: Functionality of delimiters

Title: Functionality of delimiters
I have a question about delimiters in Tiger vs. Leopard as it relates to parsing a string with an underscore “_” in it.

In Tiger, according to a book called “AppleScript – The Comprehensive Guide to Scripting and Automation on Mac OS X” by Hanaan Rosenthal, pg 66, it says there are a certain set of characters that are considered words. Among them are & * + > < @ \ ^ _ ` | , etc. and the underscore symbol is one of those.

As an example:

words of “you_me”

returns {“you “ , “_”, “me”}

This doesn’t work in Leopard. If you do the same command, you get

returns {“you_me”}

One item, not three. If you use some other symbols, for example, words of “you&me”, the result in Tiger is:

Tiger {“you”, “&”, “me”}

In Leopard you get {“you” , “me”} and the ampersand has vanished.

I have several scripts that attempt to parse a filename that looks something like this:

set filename to “1234567890_9999999999 V1 3D.eps”

In Tiger, the current script says

set A to word 1 of filename and get back “1234567890”

In Leopard, the same command returns “1234567890_999999999”

Are scripts for Tiger supposed to be compatible in Leopard without having to rewrite a bunch of stuff?

Do I need to do a bunch of front end delimiter changing and parsing to get the same effect as I get in Tiger or am I missing something?

Thanks.
Jim
 _______________________________________________
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

  • Follow-Ups:
    • Re: Functionality of delimiters
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: iChat scripting, adding an account via script
  • Next by Date: Re: Functionality of delimiters
  • Previous by thread: iChat scripting, adding an account via script
  • Next by thread: Re: Functionality of delimiters
  • Index(es):
    • Date
    • Thread