amakrkr Posted March 6, 2010 Share Posted March 6, 2010 (edited) hello, i am having a strange error with ControlSend function. What i want to do is send keys to an inactive windows. It works just fine but when i type something in MS Word for example and i press SHIFT or CTRL or ALT everything becomes crazy. Random caps lock on / caps lock off, some of the characters on my keyboard switch to US keyboard. So can anyone explain to me how to solve this problem Thank you! while 1 sleep(100) If $a = 1 Then ControlSend("notepad", "", "", "3") sleep($value*1000) EndIf If $b = 1 Then ControlSend("notepad", "", "", "4") sleep($value*1000) EndIf WEnd Edited March 6, 2010 by amakrkr Link to comment Share on other sites More sharing options...
JohnOne Posted March 6, 2010 Share Posted March 6, 2010 Your code looks fine. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
amakrkr Posted March 6, 2010 Author Share Posted March 6, 2010 Your code looks fine. fixed. Link to comment Share on other sites More sharing options...
JohnOne Posted March 6, 2010 Share Posted March 6, 2010 happy to help AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted March 6, 2010 Share Posted March 6, 2010 Currently, your controlsend dosent know which control of the window to act on, because you have no controlID set (third parameter) You can get its ID by using the windowinfotool. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
amakrkr Posted March 6, 2010 Author Share Posted March 6, 2010 Currently, your controlsend dosent know which control of the window to act on, because you have no controlID set (third parameter)You can get its ID by using the windowinfotool.yeah i knowproblem is my windows dont have any controls thos i cant put in the 3rd value. Link to comment Share on other sites More sharing options...
JohnOne Posted March 6, 2010 Share Posted March 6, 2010 Well its going to be dependant on what control you are sending to, and the rest of your code. My notepad edit control has an ID 0f 15, and its never called just, "notepad". AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
amakrkr Posted March 7, 2010 Author Share Posted March 7, 2010 Well its going to be dependant on what control you are sending to, and the rest of your code.My notepad edit control has an ID 0f 15, and its never called just, "notepad".yea nvm that i just have put that window as an example. in my program i use other window that dont have any controls. Link to comment Share on other sites More sharing options...
JohnOne Posted March 7, 2010 Share Posted March 7, 2010 Well if you can enter text manually you can do it another way, maybe, just not with controlsend. Your reluctance to post the window in question wont help your cause either. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
amakrkr Posted March 7, 2010 Author Share Posted March 7, 2010 well i dont know how else can i send text to a minimized window without activating it....any suggestions are more than welcome. ty 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