I have a loop that CALLs all kix files in enabled folder. Each file contains a function. Function name is the name of the file.

/enabled/IE.kix
/enabled/ENV.kix
/enabled/NOTICE.kix

I am trying to dynamically call these functions with the function below. the CALL($EN) doesn't seem to call the corresponding function. I also tried $EN().

I can invoke them just fine with ENV() or CALL ENV
 Code:
RUN_ENABLED("C:\Docume~1\iso\Desktop\KIX\Development\enabled")

Function RUN_ENABLED($path)
  $runenabled = Dir("$path\*.*")
  While $runenabled <> "" AND @ERROR = 0
    If $runenabled <> "." AND $runenabled <> ".."
      $EN=SUBSTR("$runenabled",1,LEN($runenabled)-4)
      CALL($EN)
    EndIf
    $runenabled = Dir()
  Loop
EndFunction


Any help would be appreciated! Thanks in advance.


Edited by iso (2007-09-28 01:59 AM)