JavaScript for Automation

Hi everyone
I’m searching info on what append with “JavaScript for Automation”
There’s not that much info on the web
I didn’t find a official forum from apple developer
Someone here have a idea if it’s already “dead language”

I’m using javascript inside acrobat ‘console’, making automation
Do you know if its possible to send the same javascript from xojo TO acrobat console
Or from " JavaScript for Automation " TO acrobat console

Hi Denis, JavaScript for Automation is an alternative/substitute for the AppleScript language, nothing more. Both uses AppleEvents and OSA (Open Scripting Architecture) under the hood. If you want to control other apps, these need to support AppleScript objects and data structures. I’m not sure what Acrobat does offer here.


Thanks Thomas
I already play with applescript quite a few times
And i’v done javascript in acrobat console to automate some task
Then i saw that the same Dev application ( OSX Script Editor ) can also do javascript too
In my perfect world… I want to built a batch processing from xojo ( applying javascript in acrobat console )
to a list of document manage by xojo
So my question is ( if someone have play with it before )…
Can i send script ( directly) or (by JavaScript for Automation) to acrobat javascript console

You will have to test the script in Script Editor first, and when you are sure it works, you can launch it from Xojo with a shell to osascript

If you are familiar already with JavaScript for automation that is fine, as long as your app runs under at least Yosemite (did not exist before). Otherwise, Xojo directly supports Applescript, which scripts you can drag into the project and call as a regular method.

If you like you can try the OSAScriptMBS class in MBS Plugin.

it allows you using AppleScript in 32/64bit apps and JavaScript in 64-bit apps.

Also you can use JavaScript without HTMLViewer with javascript classes here:

Thank you both
First i have to know if ( someOne have tried before )
to send script to Acrobat "Javascript Console " From outside of Acrobat interface

If it anything like a browser, send this and it will write to the console :

Console.Log(“hello world”)

Now this may help :

Thank you Michel