Puck Posted March 9, 2012 Posted March 9, 2012 Hello all. I am trying to simulatate what is beening done in this .HTA script here.http://community.spiceworks.com/scripts/show/673-psexec-command-builder-htaIn that I want a preview pane that will autoupdate as the users changes options on the main form, specifically with the 'command' and 'variables' input fields. The lower pane autoupdates as the user is typing. I trying to search a bit but I may not be using the correct search term to do what I want. Any push in the right direction would be appreciated.dtp
Puck Posted March 9, 2012 Author Posted March 9, 2012 (edited) Sorry to reply to my own post but it looks like I needed GUIRegisterMsg. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> GUICreate("Preview Test") $hInput1 = GUICtrlCreateInput("", 20, 20, 100, 21) $hInput2 = GUICtrlCreateInput("", 200, 20, 100, 21) $preview = GUICtrlCreateLabel("", 20, 100, 268, 33) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func MY_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $text1 , $text2 Local $iIDFrom = BitAND($wParam, 0xFFFF) Local $iCode = BitShift($wParam, 16) If $iCode = $EN_CHANGE Then $text1 = GUICtrlRead($hInput1, 1) $text2 = GUICtrlRead($hInput2, 1) GUICtrlSetData($preview, $text1 & " " & $text2 ) EndIf EndFunc Edited March 9, 2012 by Puck
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