XLimas Posted March 11, 2009 Share Posted March 11, 2009 Hello everyone, I was trying to search for this topic, but couldn't find anything what i need. My problem is that when i use "Send" function with "down" parameter the LCTRL stays pressed after i use "up" parameter, for example: Sleep(100) Send("{LCTRL down}") ;Holds the LCTRL key down MouseClick("left", 940, 646, 1, 1) Sleep(1000) Send("{LCTRL up}") After this code LCTRL is still pressed until i press LCTRL by myself. How can I fix it that it would be hold up? Thanks, Andrew Link to comment Share on other sites More sharing options...
bo8ster Posted March 11, 2009 Share Posted March 11, 2009 (edited) sorry i should read the post properly. Have a look at SendKeyDownDelay Edited March 11, 2009 by bo8ster Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
XLimas Posted March 11, 2009 Author Share Posted March 11, 2009 I have tried using SendKeyDownDelay but still LCTRL holds down after this script has finished. Here is different places where i tried to use it, still it don't help. As i know, same happens with SHIFT button. Any ideas? Sleep(3000) ;Opt("SendKeyDownDelay", 1000) Send("{LCTRL down}") ;Holds the A key down ;Opt("SendKeyDownDelay", 1000) Sleep(100) MouseClick("left", 940, 646, 1, 1) ;Opt("SendKeyDownDelay", 1000) Sleep(1000) Send("{LCTRL up}") Link to comment Share on other sites More sharing options...
XLimas Posted March 11, 2009 Author Share Posted March 11, 2009 Ok, i found it myself. If someone has same problem, here is the solution: You should use Send("{CTRLDOWN}") and Send("{CTRLUP}") instead of Send("{LCTRL down}") and Send("{LCTRL up}") 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