Send variables back to Rev from Applescript

Marian Petrides mpetrides at earthlink.net
Fri Aug 20 10:10:11 EDT 2004


Thanks, Thierry. I'm looking into this for a friend who is considering 
Rev and who does some Applescript. Unfortunately, I know no 
Applescript.

Other listers:  That fixed the problem with Thierry's sample but I am 
still having problem with more complex scripts. My friend sent me the 
following Applescript:

on run
	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
	end tell
	
	return loopIndex
end run


What he would like is to be able to capture the value of loopIndex and 
then manipulate it using Rev.  And I am having trouble figuring out how 
to get loopIndex passed from Applescript to Rev.

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.

I also tried  put loopIndex into fld 2 but I didn't expect that to work 
and, of course, it didn't.

TIA

M



On Aug 20, 2004, at 9:46 AM, Thierry Arbellot wrote:

> Marian,
>
> you should remove the quotes if you put the script into a field
> try like this:
> get (system attribute "ram ") / 1048 div 1000
>
> Thierry



More information about the use-livecode mailing list