rot Posted August 14, 2009 Share Posted August 14, 2009 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 activesleep(500)WinActivate("Document1 - Microsoft Word") ; on passe à Wordsend("^v") ; où l'on colle la fenêtre activesend("+{LEFT}") ; on sélectionne cette fenêtre pour la redimensionner;send("!j") ; activation ...sleep(500);mouseclick("left", 710,40) ; coordonnées pc0324mouseclick("left", 650,40) ; coordonnées pc0335mouseclick("left", 1200,104)send("14")send("{ENTER}")send("{ESC}")send("^{END}")send("{ENTER 2}")sleep(500)send("#m");send("{CTRLUP}")send("{LCTRL}")exit(0) Link to comment Share on other sites More sharing options...
jvanegmond Posted August 14, 2009 Share Posted August 14, 2009 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) github.com/jvanegmond Link to comment Share on other sites More sharing options...
rot Posted August 14, 2009 Author Share Posted August 14, 2009 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now