;~ #pragma compile(AutoItExecuteAllowed, true) #cs ########################################## ## ## ## Copmile this example and run it ## ## ## ########################################## #ce #include #include ;~ #include "External Tests.a3x" $hGui = GUICreate("Form1", 348, 254, 1211, 501) GUICtrlCreateLabel("Select Test Set List", 8, 8, 110, 17) $TstSetList = GUICtrlCreateCombo("", 8, 24, 249, 28) GUICtrlSetData(-1, "LOCAL|Test_Set_1.au3|Test_Set_2.au3", "LOCAL") ;$BtnLoad = GUICtrlCreateButton("Load", 264, 24, 75, 22) $BtnCall = GUICtrlCreateButton("Call Selected Function", 8, 200, 129, 41) $Lbl = GUICtrlCreateLabel("Function Return", 144, 200, 180, 17) $FuncRetOut = GUICtrlCreateInput("", 145, 218, 191, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlCreateLabel("Select Test (Function)", 8, 65, 110, 17) $FuncList = GUICtrlCreateList("", 8, 80, 329, 84) GUICtrlSetData(-1, "_LocalFunc|_External_Func_MsgBox|_External_Func_OpenFolder|_External_Func_ReturnStr", "_LocalFunc") GUICtrlSetData($Lbl, '"_LocalFunc()" Return:') GUISetState(@SW_SHOW) If GUICtrlRead($TstSetList) = "LOCAL" Then GUICtrlSetData($FuncList, "|_LocalFunc", "_LocalFunc") ConsoleWrite(GUICtrlRead($TstSetList) & @CRLF) $FunctionsList = "_Functions_List" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $TstSetList $RetVal = Call($FunctionsList) If @error Then MsgBox(16, "List Load Error", 'ERROR by data loading from "' & GUICtrlRead($TstSetList) & '"') GUICtrlSetData($FuncList, "|_LocalFunc", "_LocalFunc") ContinueCase EndIf GUICtrlSetData($FuncList, $RetVal, "_LocalFunc") Case $FuncList $sFuncName = GUICtrlRead($FuncList) GUICtrlSetData($Lbl, '"' & $sFuncName & '()" Return:') GUICtrlSetData($FuncRetOut, "") Case $BtnCall $sFuncName = GUICtrlRead($FuncList) $RetVal = Call($sFuncName) If @error Then MsgBox(16, "Error", 'Function "' & $sFuncName & '" not exists') GUICtrlSetData($FuncRetOut, $RetVal) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _LocalFunc() Return "Local " & Random(100, 999, 1) EndFunc ;==>Test1