Code: Select all
^n::
ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, w.png
If(ErrorLevel == 0){
MouseMove %foundX%,%foundY%
Send {LButton}
}else{
MsgBox, Image not found.
}
return
Code: Select all
^n::
ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, w.png
If(ErrorLevel == 0){
MouseMove %foundX%,%foundY%
Send {LButton}
}else{
MsgBox, Image not found.
}
return
LIFESAVER!usdarkejo wrote:I'm posting this to help others who haven't been able to find an answer to their issues with AHK and emulators. When MOST emulators run, they run as with elevated privileges (Administrator). Running a script without elevated permissions will not be able to communicate with an elevated program. You must right click on your script and click "Run as administrator".