• 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: Need your thoughts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need your thoughts


  • Subject: Re: Need your thoughts
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 23 Feb 2011 04:15:36 -0600

On Feb 23, 2011, at 02:56, Christopher Stone wrote:
I use the Satimage.osax's 'find text' command with regular expressions to do my lookups, but you can use tools native to Mac OS X.
______________________________________________________________________

Hey Louie,

This is the general methodology I use with the Satimage.osax:

set lookupTable to "
-------------------------------------------------------------
Christopher Stone___________________________(123) 456-78910
James Dean__________________________________(098) 765-4321
-------------------------------------------------------------
"
set chooseFromList to find text "^[^-_]+" in lookupTable all occurrences true ¬
with regexp and string result without whole word and case sensitive
set queryStr to choose from list chooseFromList
set queryStr to "^" & queryStr & "_+(.+)"
set chooseFromResult to find text queryStr in lookupTable ¬
using "\\1" with regexp and string result without whole word and case sensitive

I use tabs in my tables rather than underscores (but tabs don't translate neatly between Script Debugger and Mail.app).

Although regular expressions look like so much gibberish to the uninitiated they make it dead easy to pull data out of text tables.

--
Best Regards,
Chris
 _______________________________________________
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

References: 
 >Need your thoughts (From: louie <email@hidden>)
 >Re: Need your thoughts (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Need your thoughts
  • Next by Date: I got your thoughts
  • Previous by thread: Re: Need your thoughts
  • Next by thread: Re: Need your thoughts
  • Index(es):
    • Date
    • Thread