Apple script problems

Jim Hurley jhurley at infostations.com
Mon Dec 15 05:57:26 EST 2003


>
>
>------------------------------
>
>Message: 6
>Date: Mon, 15 Dec 2003 10:56:31 +1000
>From: Sarah Reichelt <sarahr at genesearch.com.au>
>Subject: Re: Apple script problems
>To: How to use Revolution <use-revolution at lists.runrev.com>
>Message-ID: <85674066-2E99-11D8-8E65-0003937A97B8 at genesearch.com.au>
>Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>Hi Jim,
>
>HyperCard is totally AppleScriptable. If you open the Apple Script
>Editor and then Open dictionary... you can see the list of commands
>that HyperCard responds to. Revolution has no such dictionary and does
>not respond directly to AppleScripts. You can probably do it yourself
>by writing an AppleEvent handler that responds to a dosc event (do
>script).
>
>However in the current case, you don't need to use AppleScript.
>Shorten your AppleScript to this:
>
>tell application "filemaker Pro5"
>   get every record
>   set theResult to result
>   return theResult
>end tell
>
>In your Rev button, have this script:
>On mouseUP
>   do field "theScript" as applescript
>   put the result into field "data"
>end mouseUp
>
>Cheers,
>Sarah
>sarahr at genesearch.com.au
>http://www.troz.net/Rev/


Hi Sarah,

Thank you for your response. It was very helpful. But the result of

tell application "filemaker Pro5"
get evrey record
end tell

On mouseUp
do field "theScript" as applescript
put the result into field "data"
end mouseUp

results in the following in field "data"

{{"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.

Puzzled,

Jim


More information about the Use-livecode mailing list