Send variables back to Rev from Applescript

Marian Petrides mpetrides at earthlink.net
Fri Aug 20 12:05:08 EDT 2004


Ken
Alas pasting the revised applescript into fld 1 and then clicking the 
button with that same mouseup handler still doesn't pass a value to the 
result --just results in a compiler error.  If I change the put 
statement in the mouseup handler to put loopIndex into fld 2  it does 
literally what it was told to do--displays the word loopIndex.

Thanks for trying!

Troy:
  Is your registered users stack available someplace. It sounds like you 
are using it to do things similar to what my friend is interested in 
doing (he wants to retrieve text from memos in Palm Desktop), so maybe 
the answer he needs is there.

Thanks.

Marian


On Aug 20, 2004, at 11:36 AM, Ken Ray wrote:

> On 8/20/04 9:10 AM, "Marian Petrides" <mpetrides at earthlink.net> wrote:
>
>> I tried:
>>
>> on mouseup
>>
>> do fld 1 as applescript
>> put the result into fld 2
>>
>> end mouseup
>>
>> but all that gets me is "handler run" in field 2.
>
> Marian, I think it is the "run" structure that is causing the problem. 
> I
> don't have Palm Desktop either, but if you try this:
>
>     tell application "Palm Desktop"
>         set numberOfMemos to count of memos
>         set memoMemos to {}
>         set loopIndex to 1
>
>         -- find all Memo Pad Memos (memos with no attachments) and put 
> them
> in memoMemos
>         repeat numberOfMemos times
>             set theMemo to item loopIndex of memos
>             if (count of attachments of theMemo) is 0 then
>                 set end of memoMemos to theMemo
>             end if
>             set loopIndex to loopIndex + 1
>         end repeat
>         return loopIndex
>     end tell
>
> It should probably work. Note that I moved the "return loopIndex" 
> inside the
> "tell" and removed the "run/end run" statements.
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
>
> _______________________________________________
> 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