• 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: silly newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: silly newbie question


  • Subject: RE: silly newbie question
  • From: email@hidden
  • Date: Wed, 10 Apr 2002 13:44:00 -0500

Natalie,
Here is a quick and dirty approach using the "offset" command.
There may be other more elegant ways to do it, but this one works. If you
have instances where you potentially have more than one space to deal with
you will probably need to set up some kind of repeat loop.

Source code below:
set cityName to "St. Louis"
set firstPart to characters 1 through ((the offset of " " in cityName) - 1)
in cityName as string
set newCityName to firstPart & characters -1 thru ((the offset of " " in
cityName) + 1) in cityName as string

Hope this helps!
Kevin
_______________________________________________
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.

  • Prev by Date: Re: Scripting Palm Desktop
  • Next by Date: Re: silly newbie question #42
  • Previous by thread: Re: Monitoring application in background
  • Next by thread: Re: InDesign Scripting
  • Index(es):
    • Date
    • Thread