FireLordZi Posted January 24, 2008 Share Posted January 24, 2008 If I wanted to set focus on a certain control such as an Edit control, would I do this: ControlFocus("Find Player", "", "Edit1") Assuming "Edit1" was the correct classnameNN. If this is the correct way, how do I check if this control has focus or not? While Alive() { DrinkWine(); }AutoIt Programmer Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 24, 2008 Share Posted January 24, 2008 This is the order. Create Code > Test > Get Stuck > Look at Help File > Modify Code > Test > Get Stuck > Repeat() > After 10 times then post question. Okay so test it out, then tell use how it went. If you want to test if it has focus, and it is an edit start typing if it shows up where you set he focus ooooo it has focus. Link to comment Share on other sites More sharing options...
rasim Posted January 24, 2008 Share Posted January 24, 2008 If I wanted to set focus on a certain control such as an Edit control, would I do this: ControlFocus("Find Player", "", "Edit1") Assuming "Edit1" was the correct classnameNN. If this is the correct way, how do I check if this control has focus or not? Thats not hard. Run("notepad.exe") WinWait("[CLASS:Notepad]") Sleep(1000) $Control = ControlGetFocus("[CLASS:Notepad]") If Not $Control Then MsgBox(16, "Error", "Control not focused") Else MsgBox(0, "", $Control) EndIf 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