daniel02 Posted October 11, 2009 Share Posted October 11, 2009 (edited) Hi, I have a problem sending ctrl+a keys to a program. That is NOT working: send ("^a") Next example is only partial working. The "down" is working the "up" not as all programms which are minimzied can not be maximized again until pressing strg again manually. Send("{LCTRL down}{a down}") Sleep(1000) Send("{LCTRL up}{a up}") So in the last example the ctrl+a is working but not released again. Any idea? Thanks Daniel Edited October 12, 2009 by daniel02 Link to comment Share on other sites More sharing options...
daniel02 Posted October 11, 2009 Author Share Posted October 11, 2009 Hi, what is now working: Send("^{a}") Cheers Daniel Link to comment Share on other sites More sharing options...
daniel02 Posted October 12, 2009 Author Share Posted October 12, 2009 Hi, I am wrong. It is also not working properly. It is working if I just start this single funktion. But is it not working ALLWAYS in the whole prog. Sometimes it does. Very strange, Any thoughts? Thanks Daniel Link to comment Share on other sites More sharing options...
dantay9 Posted October 12, 2009 Share Posted October 12, 2009 You should either use ControlSend, or activate the window with WinActivate() before the keys are sent. The window has to be active for the keys to be sent to that program. Link to comment Share on other sites More sharing options...
daniel02 Posted October 12, 2009 Author Share Posted October 12, 2009 Thanks for that hint but I am allready doing this Link to comment Share on other sites More sharing options...
omikron48 Posted October 12, 2009 Share Posted October 12, 2009 (edited) Maybe your program is slow in recognizing key presses? Try using: Opt("SendKeyDelay", 50) Opt("SendKeyDownDelay", 50) Stick it in the start of your script, then just do: Send("^a") Edited October 12, 2009 by omikron48 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