sl_alagappan Posted December 31, 2003 Share Posted December 31, 2003 Can anybody tell me the special keys tested with ControlSend command of v.83? sending {ENTER} key failed for me. Below is the code tried $Var="test" ControlSend($ChildWindowTitle, $ChildWindowText,"Edit3",$Var & "{ENTER}",0) Link to comment Share on other sites More sharing options...
scriptkitty Posted December 31, 2003 Share Posted December 31, 2003 Only Text for now as far as I know, but they are adding in new stuff every release. Stay tuned I guess. I keep testing my chr() as well each release. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Administrators Jon Posted December 31, 2003 Administrators Share Posted December 31, 2003 The only one that doesn't work for me is ALT combos like !f. I had some code that almost got it to work (brought up a menu) but it failed when the window was not active so I removed it. {ENTER} works fine here under XP though. Edit: Just tested {ENTER} under 95 and it works here. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
scriptkitty Posted December 31, 2003 Share Posted December 31, 2003 (edited) Thanks Jon, Sorry. Edited December 31, 2003 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Administrators Jon Posted December 31, 2003 Administrators Share Posted December 31, 2003 This is the sort of code I've been testing: If WinExists("Document - WordPad") Then WinActivate("Document - WordPad") Else Run("write.exe") EndIf WinWaitActive("Document - WordPad") Sleep(2000) ControlSend("Document - WordPad", "", "RICHEDIT50W1", "1234{ENTER}{LEFT 2}{ASC 65}") Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
scriptkitty Posted December 31, 2003 Share Posted December 31, 2003 (edited) Sorry, I was just testing it out and home and this is the one machine I didn't update. Every command works great for me now. It was pretty funny since I had all the {} command in one file. Anyhow My appologies, and I couldn't edit my post fast enough. ...edit CHR() work fine as well. and {enter} works on win2000 as well Edited December 31, 2003 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
sl_alagappan Posted January 2, 2004 Author Share Posted January 2, 2004 I suspect the control names ( class name ) that I get via AutoITSpy. Control Names obtained using AutoSpy whereby unable to send text are: Edit51 Static51 Link to comment Share on other sites More sharing options...
scriptkitty Posted January 2, 2004 Share Posted January 2, 2004 Most likely not the names, but the program you are doing it on. A lot of programs have layers, and controlsend doens't work well. Like IE and these edit boxes for instance. Can you send control text? AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
sl_alagappan Posted January 2, 2004 Author Share Posted January 2, 2004 I am able to send normal plain text to these controls but unable to send special keys like {ENTER}, {UP}, etc Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 2, 2004 Administrators Share Posted January 2, 2004 If they are edit controls does ControlSetText not work? ControlSend is a last resort after the ControlSetText function really. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
sl_alagappan Posted January 2, 2004 Author Share Posted January 2, 2004 ControlSetText works with CHR(13). Have not tried with {ENTER} for ControlSetText. From AutoSpy, could see a control called "SS32D25EditHScroll1". On the screen, it seem to be a grid control. Send() works fine here. but unable to use ControlSend(). any idea? Link to comment Share on other sites More sharing options...
sl_alagappan Posted January 2, 2004 Author Share Posted January 2, 2004 for ControlSetText(), i need to press the ENTER key so that, application validates the input and fills up other related fields with corresponding values. If no enter key pressed, other fields won't be filled up. Seems ControlsetText() does not support {ENTER} key for Edit boxes. 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