tomashen Posted December 2, 2011 Share Posted December 2, 2011 hi autoit forumers again ;D um for example..i got an input and while my gui is running .. doing some action ...where its required to read number from input... is it posible to make it like so while its running and if i change the number in the input it will read the new number when it comes to the point where it needs to read the data from that input and use it.. i remmeber using OnEvent.. but when u use OnEvent thingy the gui works whole diff way so any other choices? Proud of AutoIt Proud of MySelf :) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 2, 2011 Moderators Share Posted December 2, 2011 tomashen, Do you mean something like this? The label is updated as soon as you change the input: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <WinAPI.au3> $hGUI = GUICreate("Test", 500, 500) $hInput = GUICtrlCreateInput("", 10, 10, 200, 20) $hLabel = GUICtrlCreateLabel("", 10, 100, 200, 20) GUISetState() GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_COMMAND($hWHnd, $iMsg, $wParam, $lParam) ; If it was an update message from our input If _WinAPI_HiWord($wParam) = $EN_CHANGE And _WinAPI_LoWord($wParam) = $hInput Then ; Set the label to the new data GUICtrlSetData($hLabel, GUICtrlRead($hInput)) EndIf EndFunc ;==>_WM_COMMAND M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
tomashen Posted December 2, 2011 Author Share Posted December 2, 2011 (edited) yea exactly that :( thank you once again MELBA23 ! trying to use this now but looks complicated nvm learned it :D Edited December 2, 2011 by tomashen Proud of AutoIt Proud of MySelf :) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 3, 2011 Moderators Share Posted December 3, 2011 tomashen,You might like to read the GUIRegisterMsg tutorial in the Wiki if you want to learn more about how to intercept messages sent by your GUI. M23P.S. And a lot fewer emoticons in future please! tomashen 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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