damjaniii2 Posted October 14, 2014 Posted October 14, 2014 (edited) Hi guys. I am new here so i would need little help about the problem i have. I have one .exe program where are multiple textboxes. I need program that will wait for the cursor to come i.e. in textBox2 and than click 10 x ENTER. I have tried something so far but i didnt find a way to check if cursor is in that field (textBox2). Func asd() $title = GetFrameName("form") ;this works perfectly i have written function for it MsgBox(4096, $title, "Programme started", 10) WinActivate($title) While 1 If GUICtrlGetState(1705668) <> -1 Then ; I HAVE TRIED ID IN "", AND TRIED classnameNN too, wont work MsgBox(4096, $title, "Program tece", 10) ;JUST TESTING Send("{ENTER 10}") Else MsgBox(4096, $title, "se ne izvede", 10) EndIf WEnd EndFunc Thanks for your help in advance Edited October 14, 2014 by damjaniii2
damjaniii2 Posted October 14, 2014 Author Posted October 14, 2014 I sorted it out... kinda Now i just need a function which will return controlID if i have the classnameNN. Here is my code. Func asd() $title = DobiImeOkna("form") MsgBox(4096, $title, "Program je zagnan", 10) WinActivate($title) While 1 Local $hWin = WinWait("[CLASS:Afx:01090000:b:00010003:00000006:000403A5]", "", 10) Local $sControl = ControlGetFocus($hWin) If $sControl = "Edit27" Then MsgBox(4096, $title, $sControl, 10) Send("{ENTER 32}") ; Sends ENTER 32 times EndIf WEnd
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