These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

AppActivate

J.Iosefo
Registered: Oct 19 2011
Posts: 2

Hello All,
 
I'm new to the Acrobat community and Javascripts. I've developed PDF forms that I would like to be able to write a Javascript that will complete the following:
 
1) Set the focus on to another application
2) Send Keystrokes to the 'focused' application
 
I'm a VB programmer and can write this in VB. However, Javascript is an entirely different beast. I've tried the following:
 
//Just to see if I can set the focus on to another Window Handle
set WshShell = WScript.CreateObject ("WScript.Shell");
WshShell.AppActivate("Notepad");
 
I'm getting the following error:
ReferenceError: WScript is not defined
1:Field:Mouse Up
 
Perhaps I'm approaching this all wrong...I would really appreciate your expertise.
 
Many Thanks,
 
J.Iosefo

My Product Information:
Acrobat Pro 10.0, Windows
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
You can't access external applications from the Acrobat JS API, with the sole exception of talking to a web browser when the PDF is running embedded.
J.Iosefo
Registered: Oct 19 2011
Posts: 2
Thanks...I was afraid of that.