Send variables back to Rev from Applescript

Ken Ray kray at sonsothunder.com
Fri Aug 20 11:36:01 EDT 2004


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




More information about the use-livecode mailing list