Thanks for the help but that didn't quite fix my problem.
the new problem is that it gives an error when i try to run it.
it also starts up the Setup twice.
the script i am using is the following:
Run("freeocr541.exe")
Local $iPID = WinWait("[CLASS:TWizardForm]", "", 10)
ControlClick ($iPID "Setup - FreeOCR", "Welcome to the FreeOCR Setup Wizard", controlID [, button = "left" [, clicks = 1[, 260 [, 170]]]])
It gives the following error:
ControlClick ($iPID "Setup - FreeOCR", "Welcome to the FreeOCR Setup Wizard", controlID [, button = "left" [, clicks = 1[, 260 [, 170]]]]) ControlClick (^ERROR
Error: Error in expression.