• 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: retrieving the values of record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retrieving the values of record


  • Subject: Re: retrieving the values of record
  • From: "email@hidden" <email@hidden>
  • Date: Sun, 17 Apr 2011 08:33:40 -0700



I have a question about retrieving the values of a record.

I'm pulling some text out of an HTML file and trying to manipulate it using "TextCommands".

Using TIDs may be simpler than text commands.

HTH,

ES



set TitleText to "<title>Author: Title of article</title>"
set A_T to my GetAuthorTitle(TitleText)
set author to item 1 of A_T
set title to item 2 of A_T
display dialog author & return & title -- debug



on GetAuthorTitle(TitleText)
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"<title>", "</title>", ":"}
set {author, title} to {text item 2 of TitleText, text item 3 of TitleText}
set AppleScript's text item delimiters to oldDelims
return {author, title}
end GetAuthorTitle



 _______________________________________________
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: retrieving the values of record
      • From: Jim Brandt <email@hidden>
References: 
 >retrieving the values of record (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: retrieving the values of record
  • Next by Date: Re: Excel: hide multiple columns with Applescript
  • Previous by thread: Re: retrieving the values of record
  • Next by thread: Re: retrieving the values of record
  • Index(es):
    • Date
    • Thread