Hi all.
When populating forms on a Macintosh, I figured out a nice little hack which
allows me to populate a fillable form with values using AppleScript. The trick
is to tell Applescript to tell Acrobat to run a Javascript! Seems a little
convoluted but it works great.
So I discovered recently that Applescript can run Javascript natively! Great. I
figured I would bypass applescript and pass javascript directly! But I've run
ingo a snag. Here is a quick sample of what works:
tell application "/Applications/Adobe Acrobat DC/Adobe Acrobat.app"
set theScript to "this.getField(\"technotes\").value = \"This is only a test.
\";"
do script theScript
end tell
Don't let the backslash quotes trip you up I am just escapting quote
characters. Now the Javascript version *should* look like this but it does NOT
work!
Acrobat = Application('Adobe Acrobat');
Acrobat.activate();
delay(1);
this.getField("technotes").value = "This is only a test.";
I get an error that this.getField is undefined! Whaaaaa??? Why does it work as
an applescript command then??
Bob S
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode