Page 1 of 1

Execute Javascript?

Posted: Fri Apr 14, 2006 5:21 pm
by Timothy
I asked this question at the tail end of a thread that has grown cold. At the risk of being a pest, I'll ask again.

If I have some valid javascript in a RR container, is there a way to make it execute? (I want to use Javascript to interact with a PDF document from within RR.)

Thanks in advance,

Tim

Posted: Fri Apr 14, 2006 5:41 pm
by BvG
I don't know how to run it in pdf, sorry, but you might generate a html page, save it and run it in a browser. Basically you need a interpreter for your javascript, and runrev doesn't have one build in.

Posted: Fri Apr 14, 2006 9:04 pm
by Timothy
Thanks.

Is there some way to get my Macintosh OS X machine to execute javascript, except from a web browser?

If so, is there a way for RR to launch the javascript interpreter, send javascript to the interpreter, and receive data back from it?

If not, an HTML page might be an interesting workaround. I've never done anything like that. How feasible is it?

Tim

Posted: Fri Apr 14, 2006 9:28 pm
by BvG
There is also the JavaScript OSA plugin, I have never used it, but it allows you to run javascript via the (runrev) "do" command (because runrev can execute osa scripts that way).

http://www.latenightsw.com/freeware/Jav ... nload.html

JavaScript OSA Works Well

Posted: Sat Apr 15, 2006 4:01 am
by revdan
I've never tried using the JavaScript OSA in Rev, but I've used it from Python and Terminal with success and not a lot of hassle. It's been a while but my sense is it works fine.

Posted: Sun Apr 16, 2006 10:23 pm
by mcgrath3
Timothy wrote:Thanks.

Is there some way to get my Macintosh OS X machine to execute javascript, except from a web browser?

If so, is there a way for RR to launch the javascript interpreter, send javascript to the interpreter, and receive data back from it?

If not, an HTML page might be an interesting workaround. I've never done anything like that. How feasible is it?

Tim
Tim

put field "myjavascript" into tScript
do tScript as javascript

As long as the Javascript OSA is installed then this should work just fine for you.

Tom