gte Posted May 4, 2009 Posted May 4, 2009 Since you cannot have a function inside of a function, I'd like to know how to trigger 2 (or more) functions off of one gui event, specifically the guictrlsetonevent? Here is an example I believe, it's not working of course though, but gives the general idea I think? expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 633, 447, 1527, 244) $update = GUICtrlCreateButton("Run 2 functions with one click of this button", 192, 112, 179, 113, BitOR($BS_VCENTER,$BS_MULTILINE)) GUISetState(@SW_SHOW) GUICtrlSetOnEvent($update, "update2") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd func update1() RunWait('notepad.exe', @WindowsDir) endfunc func update2() RunWait('calc.exe', @WindowsDir) endfunc Func CLOSEClicked1() Exit EndFunc Func CLOSEClicked2() Exit EndFunc HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
Valuater Posted May 4, 2009 Posted May 4, 2009 I already helped you here.....http://www.autoitscript.com/forum/index.ph...st&p=6781608)
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