LithiumLi Posted January 18, 2009 Share Posted January 18, 2009 Hello I am not doing so well today, I think I am not able to think because I am so sick My second Autoit problem today is that when I run this example the edit box is Selected/Highlighted and I don't want it to be Selected/Highlighted because it ruins my script, I think it is "highlighting" my edit box because it is the only control so may be if I take focus away from it, it won't "highlight" it. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Example", 250, 250) GUICtrlCreateEdit("Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah", 0, 0, 250, 250) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Dreamfire Posted January 18, 2009 Share Posted January 18, 2009 Easy but effective, #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Example", 250, 250) GUICtrlCreateEdit("", 0, 0, 0, 0) ;; <<<<<<<<<<<<<< GUICtrlSetState(-1, $GUI_HIDE) ;; <<<<<<<<<<<<<< GUICtrlSetState(-1,$GUI_FOCUS) ;; <<<<<<<<<<<<<< GUICtrlCreateEdit("Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah", 0, 0, 250, 250) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
LithiumLi Posted January 18, 2009 Author Share Posted January 18, 2009 (edited) This works great but I wonder why I can't use $GUI_NOFOCUS No Focus instead of Focus instead, your way works great but is there a proper way of doing it anybody. Edited January 18, 2009 by LithiumLi Link to comment Share on other sites More sharing options...
Dreamfire Posted January 18, 2009 Share Posted January 18, 2009 This works great but I wonder why I can't use $GUI_NOFOCUS No Focus instead of FocusoÝ÷ Ú)ìµæÊ«Á¬°¢¹,·µ»Ëaz·¦º)z¼ÊÝ¢)à֧ɺËú®¢×²y¨bz0èrë(¬y鬶(®Gè®X¬¶øÂÆ®¶sbb33c´uTôäôdô5U2Æ7GfWr6öçG&öÂvÆÂÆö÷6Rfö7W Link to comment Share on other sites More sharing options...
rasim Posted January 18, 2009 Share Posted January 18, 2009 LithiumLiExample:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> GUICreate("Example", 250, 250) $cEdit = GUICtrlCreateEdit("Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah", 0, 0, 250, 250) GUISetState(@SW_SHOW) GUICtrlSendMsg($cEdit, $EM_SETSEL, -1, 0) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
crzftx Posted January 18, 2009 Share Posted January 18, 2009 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Example", 250, 250) GUICtrlCreateEdit("", 0, 0, 250, 250) GUISetState(@SW_SHOW) GUICtrlSetData(-1, "Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah") While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd 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