Thanks a lot. I rewrote that piece of code, which works fine now, EVEN WITH PARAMETERS passed to the function we want to be called:
Code:
doScheduledTask(2006, 02, 28, "testTask('hello')") ;call function
;Function declaration
FUNCTION doScheduledTask($startY, $startM, $startD, $nameOfFunction)
;depending on parameters $startY, $startM, $startD, etc. call function
$rc = EXECUTE($nameOfFunction) ;calling a function works fine, including params to that function!
ENDFUNCTION
;Function declaration
FUNCTION testTask($p1)
? "we are in testTask() now " + $p1
ENDFUNCTION
The final versions of my functions will be sort of
Code:
; doScheduledTask("<",startY,startM,startD,"functionName",
; OPTIONAL endY,OPTIONAL endM,OPTIONAL endD)
; [executes given Function before "<", exactly "=", after ">"
; or "!" inbetween given Date(s)]
; doTempMapping("usrName","<",startY,startM,startD,"X:",
; "\\uncPath\shareName",OPTIONAL endY,
; OPTIONAL endM,OPTIONAL endD)
; [maps given path to given Drive-Letter before "<", exactly "=",
; after ">" or "!" inbetween given Date(s) for given userName]
I only roughly checked the UDF Library. Maybe such code already exists.