Sign in to follow this  
Followers 0
keashdoc

Why does the Save As Window loose focus

2 posts in this topic

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

Share this post


Link to post
Share on other sites



Have you tried removing sendkeepactive("tosign")? That might be holding "tosign" as the active window when your box appears.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0