I'm guessing that theproblem is in the region specified for the image search. You should try
Code:
Coordmode, pixel, screen
ImageSearch, FoundX, FoundY, 0,0, %A_ScreenWidth%, %A_ScreenHeight%, image.bmp
To answer your other question:
You can either specify an absolute path to the image.
Code:
ipath = %A_MyDocuments%\Ahk Macros\image.bmp
;...
ImageSearch, FoundX, FoundY, 0,0, %A_ScreenWidth%, %A_ScreenHeight%, %ipath%
or you can set the working directory to the folder that has the image
Code:
SetWorkingDir, %A_MyDocuments%\Ahk Macros\
;...
ImageSearch, FoundX, FoundY, 0,0, %A_ScreenWidth%, %A_ScreenHeight%, image.bmp
or you can search a folder and subfolders for an image with a matching name
Code:
Loop, %A_MyDocuments%\image.bmp, 0, 1
ipath = %A_LoopFileLongPath%
;...
ImageSearch, FoundX, FoundY, 0,0, %A_ScreenWidth%, %A_ScreenHeight%, %ipath%
And, no matter which way you choose, using
Code:
IfNotExist %YourImageFilePathAndName%
MsgBox Dur! script es muy stupido`nFile not found.
should at least tell you if the script can find the file.