RunRev AppleScript Question

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Oct 1 09:56:00 EDT 2008


Hi Dave,

myStackShortName is part of the string, it isn't parsed by  
AppleScript. I suppose Rev can't find stack "myStackShortName".

Here's an example that works.

I have a stack "Untitled 1" with the following script:

on foo theString
    beep
    put theString
end foo

and I made this AppleScript:

set myScript to "send \"foo\" && quote & \"Hello World\" & quote to  
stack \"Untitled 1\""
tell application "Revolution" to do script myScript

If run this script from within Script Editor, I hear the beep and the  
message box contains "Hello World".

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum/

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html 
  for more info.

On 1 okt 2008, at 14:30, Dave wrote:

> Hi Mark,
>
> I just tried the following:
>
> set myStackShortName to "SATest1"
> set myScript to "send \"revSaveAsStandalone\" && quote &  
> myStackShortName & quote to stack \"revSaveAsStandalone\""
> tell application "Revolution"
> do script myScript
> end tell
>
> And it doesn't work!
>
> I've been trying loads of different syntax's but I can't find the  
> secret code!
>
> Here's an interesting one:
>
> In Stack Script of SATest1 I have the following handler:
>
> on Beeper theMessage
> beep
> answer theMessage
> end Beeper
>
> Then from the AppleScript I do:
>
> set myQuote to (ASCII character 34)
>
> set myRRScript to "send beeper" & " & quote & " & myQuote &  
> "Message" & myQuote & " & quote " & " to stack " & myQuote &  
> "SATest1" & myQuote
> 	
> Which works and displays "Message", however if I change it to:
>
> set myRRScript to "send beeper" & " & quote & " & myQuote & "Hello  
> Message" & myQuote & " & quote " & " to stack " & myQuote &  
> "SATest1" & myQuote
>
> Then Beeper gets called (it beeps!) BUT the message is empty?
>
> What gives???
>
> All the Best
> Dave
>




More information about the use-livecode mailing list