Function RUN_ENABLED($path)
$count = 0
$runenabled = Dir($path + '\*.KIX')
While $runenabled <> '' AND @ERROR = 0
;;; If Left($runenabled, 1) <> '.'
;;; If Right($runenabled, 4) = '.kix'
'Loading ' $Path + '\' + $runenabled ' into memory' ?
CALL $path + '\' + $runenabled ; Load into memory
If Open(3,$path + '\' + $runenabled,2) = 0 ; open the function file
$Line = Trim(ReadLine(3)) ; read the line, remove all leading/trailing spaces
While @ERROR = 0 ; loop until EOF error
If InStr($Line, 'Function') = 1 ; does the line contain a Function declaration?
; Line should look like:
; 1234567890123...
; Function MyFunc(arg)
; so get the data starting at the 10th char and continue to the "(" char
$Fn = Trim(Split(SubStr($Line, 10), '(')[0])
'Calling ' $Fn ?
Execute ($Fn + '()' ; This string might need to be built to contain args.
;CALL NOTICE
EndIf
$Line = Trim(ReadLine(3)) ; Get the next line
Loop
$ = Close(3) ; done, close the input file
EndIf ; open success
;;; EndIf ; .kix file
;;; EndIf ; not a dir file
$runenabled = Dir() ; find next file
Loop
EndFunction