Hi,
I am trying to automate Adobe Acrobat 9 Standard (running on Windows 7 home) to digitally sign documents. I have created the following script.
;
ShellExecute("c:\esign\tosign.pdf")
if winwaitactive("tosign","",30) then
Winsetstate("tosign","",@SW_MAXIMIZE)
sleep(300)
;MouseClick("left", 100, 100, 2)
WinSetOnTop("tosign", "", 1)
sendkeepactive("tosign")
send("^0")
sleep(300)
send("^+{END}")
sleep(300)
;send("!")
;sleep(500)
;send("D")
;mouseclick("left",460,60)
;send("!D")
;sleep(100)
send("{ALT}+A")
sleep(400)
send("S")
sleep(400)
send("P")
sleep(1000)
; WinSetOnTop("tosign", "", 1)
;mouseclickdrag("left",650,1100,1100,1130)
sleep(500)
; sleep(200)
; send("{ENTER}")
; sleep(1000)
; send("c:\esign\signed.pdf")
; send("{ENTER}")
; sleep(1000)
;winclose("tosign")
;winclose("tosign")
Else
msgbox(0,"no","no")
endif
---------------------------------------------------------------------------------------------------------
When I run it, it opens the adobe, drops down the menu for signing and when the sign document dialog box comes up, it has lost focus and none of the commands are sent to that box. I have tried all sorts of trick - WinsetonTop, WaitWinActive and even clicking the mouse in the dialog box to get it to the forefront focus but nothing works. Does anyone have any idea how I can get the dialog box to stay at top and not loose focus?
Thanks
KEashdoc