Send variables back to Rev from Applescript

Thierry Arbellot thierry.arbellot at wanadoo.fr
Fri Aug 20 09:46:07 CDT 2004


Woaw, it becomes hard
I don't have the "Palm Desktop" app, then I can't test.

Anyway, let's try something (just an idea)
put the following line
get loopIndex
into the Applescript  just before the return.
I guess the get command put the variable (loopIndex) into the result

I hope it will work

Otherwise, you must have to learn Applescript ;-)
Here is the link to the online documentation:
http://developer.apple.com/documentation/AppleScript/AppleScript.html

Thierry.

On Friday, Aug 20, 2004, at 16:10 Europe/Paris, Marian Petrides wrote:

> 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

          get loopIndex

> 	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
>
> _______________________________________________
> 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