• 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: Help with find text command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with find text command


  • Subject: Re: Help with find text command
  • From: Philip Aker <email@hidden>
  • Date: Fri, 03 Aug 2007 00:02:02 -0700

>>The script below takes some text paragraphs with 2 legal old style ISBN numbers and inserts the new style numbers (as HTML links) with the price from a trumped up conversion map and then writes the result   to an HTML file on the user's desktop. It avoids the two illegal ISBNs. Let's see your "pure AppleScript" solution. Let me know when it's done so we can compare speeds.

Phil, 

SVP, it's Philip (with two syllables),


I'm not sure what the point of the HTML links are, they seem a bit superfluous, beyond what the original poster intended. Plus, if all you're interested in is measuring speed, it seems like you're arbitrarily adding tasks, perhaps to exaggerate the difference? 

The point is to insert the new ISBN and price after the found ISBN-10 in the original text. In the absence of whatever spreadsheet William is using and In Design, the HTML output constitutes a method to verify output. I believe the file write times will be roughly similar between Tcl and AppleScript in this case (no meta-data being specifically added).


If you're script is only finding 2 legal ISBN numbers in that text, I think it needs some work. 

The script found the two "legal" ISBN-10s in the 't' variable.


How does your script handle found ISBN numbers that don't have prices?

Here's the remark from the challenge post: "…with the price from a trumped up conversion map…".
Here I assumed that the real conversion map would handle all ISBN-10s found because William would only have those in his In Design layouts.
However, I can adapt for a missing case. 


I pasted your script into my script editor and it produced an empty result. Is there some missing code to make it work on any mac?

Nope. The script begins at:

-- new_isbn.scpt

set t to "I'm using 

You were supposed to use exactly that text and produce a similar result. 


Here's my version. It is not optimized for speed.  

Thanks for making the effort, however it does not attain the goal of inserting the mapped ISBN-13 and price after the located ISBN-10 in the original text. Also, please don't use 'choose file' because the time the user takes to select a location is variable. Can you attain that in the HTML output?


Philip Aker
email@hidden


 _______________________________________________
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: 
 >Re: Help with find text command (From: Ed Stockly <email@hidden>)

  • Prev by Date: Re: Help with find text command
  • Next by Date: Re: Script to click on NSStatusItem menu & its submenus
  • Previous by thread: Re: Help with find text command
  • Next by thread: Re: Help with find text command
  • Index(es):
    • Date
    • Thread