--------------------------------------------------------------------

Message: 1
Date: Mon, 15 Dec 2003 10:16:49 -0600
From: "Ken Ray" <[EMAIL PROTECTED]>
Subject: RE: Apple script problems
To: "'How to use Revolution'" <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;       charset="US-ASCII"


 {{"4535", "Gossett", "Joshua", "Boreham", "12975", "", "", ""},
 {"109769", "Hochwald ", "Joshua ", "American Hill ", "15822",
 "sAddress sLast", "", "Voter"}}

(These are just two records in this voter database.)

 Now I can get rid of the quotes and the curly brackets (by putting
 the results into a variable and using the "replace" command), but I
 don't understand their origin. They are not present in the original;
 the fields are all just simple text. The quotes are not so surprising
> as the curly brackets.

Both of these are provided courtesy of AppleScript; what it returns from
the request to get the records is an AppleScript "list", which is
quoted, comma-delimited, and surrounded in braces. If you don't want
them, you could manipulate them on the AppleScript side before getting
"the result" in Rev, or you can do as you are doing and post-process
them in Rev.

So, in AppleScript, to get the name "Joshua" from the two records you
retieved, you could do it this way:

  get every record
  get item 3 of item 1 of result
  -- now result contains "Joshua" (including quotes)

HTH,

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

Ken,

Thanks. It is always good to know the reasons.

I suspect that Run Rev would be able to do the processing faster than AppleScript. What do you think?

This is a very large county election database (16,000 records with 25 fields per record). So speed is of the essence.

Of course the fastest things is probably the old fashioned way. Save the DB as a text file and import that into Run Rev. Trouble is, I also have to reverse the process when I'm finished with it in RR.

Jim
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to