I tried with AutoHotkey_2.0-a081.
The ouput of your code is:
Code: [Select all] [Download] (Untitled.txt)GeSHi © Codebox Plus
temp.ahk (4) : ==> Function calls require a space or "(". Use comma only between parameters.
Specifically: ImageSearch, oX, oY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, "C:\Temp\Test.png"
This is in accordance with the documentation: https://autohotkey.com/v2/v2-changes.htm
There is no comma between the function name and parameters, so MouseGetPos(, y) = MouseGetPos , y (x is omitted). A space or tab is required for clarity.
After I fixed all those errors I got an error caused by using unquoted string
After fixing all of those the program finally runs but then there is an error with
because instead of doing what it did in v1 it dereferences the screen width and then you have a variable that starts with a number(illegal).
The only logical conclusion I can reach at this point is that you are using v1.1
functions defined in one of your function libraries.