fxg4758 Posted February 14, 2009 Posted February 14, 2009 Hi. This can ben a very newbie question, but can someone tell what is wrong about this code? It always show me the message box whatever is the control? Thanks for information. If _IsPressed("23") then $accEnter = NET_ControlGetHandleByName($Test1, "", "Box") Send("{F9}") If ControlGetFocus($accEnter) <> 1 Then MsgBox(4096, "Test", "This box will time out in 10 seconds", 10) $accEnter = 0 endif
Manjish Posted February 14, 2009 Posted February 14, 2009 Returns the ControlRef# of the control that has keyboard focus within a specified window. ControlGetFocus ( "title" [, "text"] ) Parameters title Title of window to check. text [optional] Text from window to check. Return Value Success: Returns the ClassNameNN of the control that has keyboard focus within a specified window. Failure: Returns "" (blank string) and sets @error to 1 if window is not found. If ControlGetFocus($accEnter) <> 1 Then MsgBox(4096, "Test", "This box will time out in 10 seconds", 10) controlgetfocus will not retun 1.. this maybe ur problem.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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