Mam kilka funkcji o tej samej strukturze (uproszczony):Przechodząc do funkcji jako parametr w AutoIt
func moveFiles()
local $error = 1
For $i = 1 to 100
updateProgress($i)
updateStatus("Processing " & $i & "/100 files")
$error *= moveFile($i)
Next
Return $error
endFunc
Chciałbym, aby ten rodzajowy funkcja tak:
func doSomething($function)
local $error = 1
For $i = 1 to 100
updateProgress($i)
updateStatus("Processing " & $i & "/100 files")
$error *= $function($i) ;execute the function that was passed
Next
Return $error
endFunc
Tak mogę zrobić tak:
doSomething($moveFiles)
doSomething($compareFiles)
doSomething($removeFiles)
...
jest to możliwe w AutoIt v3 i jak mogę to zrobić?