BlueScreen Posted May 1, 2006 Share Posted May 1, 2006 Hi all, Check this out. How can I prevent the user to click in the Edit window? If he clicks there, the numbers will be written where the mouse is... Thanks, Global $InfoWindow CreateLogGui () For $i=1 to 100 SendToLog ($i) Sleep (200) Next Func CreateLogGui () GUICreate("Logger",400,200,-1,-1) $InfoWindow=GUICtrlCreateEdit ("", -1,-1,400,200) GUISetState () EndFunc Func SendToLog ($Text) GUICtrlSetData($InfoWindow,$Text & @CRLF,1) GUISetState () EndFunc Link to comment Share on other sites More sharing options...
GaryFrost Posted May 1, 2006 Share Posted May 1, 2006 this should work for you Func SendToLog ($Text) GUICtrlSetData($InfoWindow,GUICtrlRead($InfoWindow) & $Text & @CRLF,"") GUISetState () EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
BlueScreen Posted May 1, 2006 Author Share Posted May 1, 2006 this should work for you Func SendToLog ($Text) GUICtrlSetData($InfoWindow,GUICtrlRead($InfoWindow) & $Text & @CRLF,"") GUISetState () EndFunc Thanks, dude! Link to comment Share on other sites More sharing options...
BlueScreen Posted May 4, 2006 Author Share Posted May 4, 2006 Hmmm. Yeah, it works, but each time the function is called the top of the log is shown. This is not user-friendly, since your reading of the log is interrupted each time the function is called. Is there an other way? Thanks, Link to comment Share on other sites More sharing options...
GaryFrost Posted May 4, 2006 Share Posted May 4, 2006 #include <GuiEdit.au3> Global $InfoWindow CreateLogGui () For $i=1 to 100 SendToLog ($i) Sleep (200) Next Func CreateLogGui () GUICreate("Logger",400,200,-1,-1) $InfoWindow=GUICtrlCreateEdit ("", -1,-1,400,200) GUISetState () EndFunc Func SendToLog ($Text) GUICtrlSetData($InfoWindow,GUICtrlRead($InfoWindow) & $Text & @CRLF,"") _GUICtrlEditLineScroll ($InfoWindow, 0, _GUICtrlEditGetLineCount($InfoWindow)) EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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