I think it comes down to the fact that you have the AS in a field. If it was all via code then you could just script it together revolution variables and AS code, but then you would have to splice multiple AS lines together in your code. I actually find that using custom properties is easiest and then use "<myvalue>" so that when you REPLACE the <myvalue> you still get the quotes where they belong in the AS script, etc.

Tom McGrath III
Lazy River Software
[email protected]

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html


On Dec 21, 2009, at 6:44 PM, Thomas McGrath III wrote:

Unless things have changed this is the only way I have ever seen it done. They have made some changes to do so I would check that just in case.

Tom McGrath III
Lazy River Software
[email protected]

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html


On Dec 21, 2009, at 6:26 PM, Howard Bornstein wrote:

Thanks Tom,

This does work. So do I gather however, that you can't pass or intermix Rev parameters directly with Applescript parameters? In other words, if I have a variable in Rev called tColor which contains "Red", I can't ever use that directly in an Applescript statement? Variables always have to be plugged in to a hard-coded AS statement using the replace command or something similar?

--
Regards,

Howard Bornstein
-----------------------
www.designeq.com

On Mon, Dec 21, 2009 at 3:17 PM, Thomas McGrath III <[email protected]>wrote:

Add something like this:

     put field 1 into tTemp
     replace "tWindowName" with "Pictures" in tTemp
     do tTemp as Applescript


I usually do special tag around 'replaceable' items like in
replace "<property>" with pProperty in tTheScript
do tTheScript as applescript

HTHs

Tom McGrath III
Lazy River Software
[email protected]

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html







On Dec 21, 2009, at 6:01 PM, Howard Bornstein wrote:

Hmmm, I thought this was straightforward but I can't seem to get this to
work.

I want to pass a value from Rev to an applescript. Here is a simplified
version of what I'm trying to do:

on mouseup
 Put "Pictures" into tWindowName
 do field 1 as Applescript
end mouseup

Field 1 contains the following:

Set theWindow to tWindowName
Tell application "Finder"
 get bounds of window theWindow
end tell

This results in an applescript execution error. If I substitute "Pictures" for tWindowName, it works properly. But rather than hard-coding the window
name into the applescript I want to pass it as a parameter.

How can I take a Rev variable and pass it into an applscript?

--
Regards,

Howard Bornstein
-----------------------
www.designeq.com


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to