Rev && appleScript

Jim Ault JimAultWins at yahoo.com
Tue Jan 13 19:38:09 EST 2009


The biggest reason me to use 'return' in AppleScripts called by Rev is that
you can build whatever you wish as a return value and make sure it gets
returned in the format you want.

AppleScript has an odd view of text, paragraphs, lists, and items, as well
as folder paths.

Jim Ault
Las Vegas

On 1/13/09 3:57 PM, "Kay C Lan" <lan.kc.macmail at gmail.com> wrote:

> On Wed, Jan 14, 2009 at 5:00 AM, Mark Schonewille <
> m.schonewille at economy-x-talk.com> wrote:
> 
>> 
>> To return a value back to Revolution, use the return command :-)
>> 
>> put "set x to 12" & cr & "return x" into myScript
>> do myScript as AppleScript
>> put the result into rslt
>> 
> 
> Not a professional programmer so there may be a good reason to 'return' the
> result, but I don't think it's necessary. I extract stuff from applescript
> all the time to Rev without using 'return'.
> 
> Try this in Rev's multi-line Message box:
> 
> put "set x to 12" into myScript
>    do myScript as AppleScript
> put the result
> 
> My understanding is that whatever happened on the last line in applescript
> will end up in 'the result' in Rev automatically. If applescript fails mid
> execution I believe an error message, if there is one, will end up in Rev's
> 'the result'.
> 
> For cross platform compatibility maybe it's a good idea as I note the Doc's
> mentioning defining a global variable 'result' in VBscript for Windows as no
> automatic result occurs.
> 
> HTH
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list