Apple script problems

Sarah Reichelt sarahr at genesearch.com.au
Sun Dec 14 18:56:31 CST 2003


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/

On 15 Dec 2003, at 10:14 am, Jim Hurley wrote:

> I can't seem to get RunRev to respond to a simple applescript.
>
> In Run Rev I have in field "theScript"
>
> tell application "filemaker Pro5"
> get every record
> set theResult to result
> end tell
> tell application "Hypercard)"
> activate
> set card field "data" to theResult
> end tell
>
> And in my button:
>
> On mouseUP
> do field "theScript" as applescript
> end mouseUp
>
> Now this works as expected. (It is necessary to say "card field" or 
> HyperCard will not recognize the field.
>
>  But if I replace "Hypercard" with "Revolution" I get nothing in field 
> "data" . (It doesn't help to change the line to: set field "data" to 
> theResult.)
>
> What is it that HyperCard sees that RunRev does not?
>
> Jim
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>



More information about the use-livecode mailing list