• 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: Changed definition of word? No dashes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changed definition of word? No dashes?


  • Subject: Re: Changed definition of word? No dashes?
  • From: Nigel Garvey <email@hidden>
  • Date: Sat, 10 Feb 2001 15:43:08 +0000

Harald E Brandt wrote on Fri, 9 Feb 2001 22:23:25 +0100:

>+--> Jolly Roger wrote 01-02-08:
>>One thing you might want to look into doing as a work-around is use
>>AppleScript's text item delimiters to parse text items:
>>
>>set saveDelims to AppleScript's text item delimiters
>>set AppleScript's text item delimiters to {" "}
>>log item 5 of (text items of "bla bla -435,00 ")
>>set AppleScript's text item delimiters to saveDelims
>>
>>-- "-435,00"
>>
>>Obviously that's not a very good solution - depends on how desperate you
>>are, I guess.
>+-
>
>Thanks a lot for the hint!
>It seems like something along this is what I will have to do.
>More elegant, however, would be the ability so set delimiters for words.
>The problem with the proposal above is that I must know exactly the number
>of spaces (which can vary). I would like to set a delimeter of white space.

I imagine that Chris Nebel's reply gets closer to the root of your main
problem; but just out of interest, to adapt JR's idea to meet your
objection:

set saveDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {" "}
log item -1 of (text items 1 thru word -1 of "bla bla -435,00 ")
-- or:
log text item -1 of (text 1 thru word -1 of "bla bla -435,00 ")
set AppleScript's text item delimiters to saveDelims


NG


  • Prev by Date: Keychain Scripting (Was Re: Keeping a volume Mounted)
  • Next by Date: Re: Smile, Script Debugger, Scripter
  • Previous by thread: Re: Mount Volume using server's DNS name
  • Next by thread: Re: Changed definition of word? No dashes?
  • Index(es):
    • Date
    • Thread