Jump to content
Sign in to follow this  
rot

CTRL still down when script ends

Recommended Posts

rot

Hi,

I have a problem with my script and can't figure out where the problem is. I very much appreciate your help for debugging it.

When the script ends, the Control key is still pressed down. I need to manually press the LEFT CONTROL key to release it.

I tried sending {CTRLUP} or {LCTRL} at different locations but it doesn't help.

For your information, the script copies the active window (with printkey), pastes it in a Word document, resizes it, carriage returns to prepare the next copy and exits Word.

Thanks for your precious help.

Here's the script

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_outfile=C:\Documents and Settings\rot\Desktop\test.exe

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

send("^{PRINTSCREEN}") ; copie fenêtre active

sleep(500)

WinActivate("Document1 - Microsoft Word") ; on passe à Word

send("^v") ; où l'on colle la fenêtre active

send("+{LEFT}") ; on sélectionne cette fenêtre pour la redimensionner

;send("!j") ; activation ...

sleep(500)

;mouseclick("left", 710,40) ; coordonnées pc0324

mouseclick("left", 650,40) ; coordonnées pc0335

mouseclick("left", 1200,104)

send("14")

send("{ENTER}")

send("{ESC}")

send("^{END}")

send("{ENTER 2}")

sleep(500)

send("#m")

;send("{CTRLUP}")

send("{LCTRL}")

exit(0)

Share this post


Link to post
Share on other sites
rot

This works fine!

Thanks a lot Manadar for this quick answer ...

Syntax for sending a left control up is like this:

Send("{LCTRL UP}")

but maybe the right key is stuck, so try this too:

Send("{RCTRL UP}")

End of your script:

send("{ENTER 2}")
sleep(500)
send("#m")

Sleep(500)
Send("{LCTRL UP}")
Send("{RCTRL UP}")

exit(0)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.