fi3ldy Posted February 4, 2007 Posted February 4, 2007 Im having trouble updating the text using guictrlsetdata. this is the code: CODE #include <GUIConstants.au3> GUICreate("Test", 600, 410,(@DesktopWidth-400)/2, (@DesktopHeight-400)/2) $log_content = "information..." $log_show = GUICtrlCreateEdit($log_content, 50, 50, 500, 310, $ES_READONLY, $ES_MULTILINE) GUISetState() HotKeySet("{F9}", "Update_Log") Func Update_Log() GLOBAL $log_updated = $log_content & @CRLF & "Next line with info..." GUICtrlSetData($log_show, $log_updated) EndFunc While 1 sleep(10) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd Im using a hotkey atm, but i basically need it so when F9 is pressed, each time it inserts a new line... at the moment it only inserts one new line, then doesnt update it again, any help appriciated! thanks alot
Moderators SmOke_N Posted February 4, 2007 Moderators Posted February 4, 2007 #include <GUIConstants.au3> GUICreate("Test", 600, 410,(@DesktopWidth-400)/2, (@DesktopHeight-400)/2) $log_content = "information..." $log_show = GUICtrlCreateEdit($log_content, 50, 50, 500, 310, $ES_READONLY, $ES_MULTILINE) GUISetState() HotKeySet("{F9}", "Update_Log") Func Update_Log() $log_updated = GUICtrlRead($log_show) & @CRLF & "Next line with info..." GUICtrlSetData($log_show, $log_updated) EndFunc While 1 sleep(10) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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