ejemplo, descargue 2 imágenes en el desktop, comience con F2 , repetir búsqueda, romper con esc
Code: Select all
#Warn
setworkingdir, %a_scriptdir%
wa:=A_screenwidth,ha:=A_screenHeight
CoordMode,Pixel,Screen
CoordMode,Mouse,Screen
i:=0
;------
ur1=https://raw.githubusercontent.com/KituhasWHCS/samp/main/c1.png
SplitPath,ur1, name1, dir1, ext, name_no_ext, drive
f1 := a_desktop . "\" . name1
;--
ur2=https://raw.githubusercontent.com/KituhasWHCS/samp/main/f1.png
SplitPath,ur2, name2, dir2, ext, name_no_ext, drive
f2 := a_desktop . "\" . name2
;---- download 2 pictures to desktop --------
ifnotexist,%f1%
urldownloadtofile,%ur1%,%f1%
ifnotexist,%f2%
urldownloadtofile,%ur2%,%f2%
;---
return
;--------------------------------------------
ESC::exitapp
;-------------
;---------------------------------
$f2::
a1:
ImageSearch,xf,yf,0,0,%wa%,%ha%,*transblack %f1%
picx:=name1
gosub,errorx
;-------------
ImageSearch,xf,yf,0,0,%wa%,%ha%,*transblack %f2%
picx:=name2
gosub,errorx
gosub,a1
return
;-------------
errorx:
i++
if errorlevel=1
{
msgbox, 262208, ,Error`nTry with next picture in 3 seconds,3
return
}
else if errorlevel=2
{
msgbox, 262208, ,Picture %picx% not found`nNow continue in 3 seconds with next-picture,3
return
}
;-----------------------
MouseMove,%xf%,%yf%,
;MouseClick,left,%xf%,%yf%
ToolTip,aquí está la imagen > %picx%
sleep,2000
tooltip
return
;=====================================================