Post by garry » 09 Jun 2018, 14:05
noch ein Beispiel mit imagesearch :
Code: Select all
;- AHK FireFox
;- 1- Speichere zuerst das Bild von Firefox
; Kreis mit Pfeil , oben links wenn Url-Load beendet
;----------------------------------------------------------------------------------------
#warn
#Singleinstance,force
Settitlematchmode,2
Coordmode,pixel
ur:="https://autohotkey.com/boards/"
;IE:=A_programfiles . "\Mozilla Firefox\firefox.exe "
IE:="" ;- default browser
f1=%a_scriptdir%\Reload_Ico.png
SplitPath,f1, name, dir, ext, name_no_ext, drive
wa:=A_screenwidth
ha:=A_screenHeight
;- define a place to search or whole screen
x1 :=(wa*1)/100
y1 :=(ha*1)/100
x2 :=(wa*20)/100
y2 :=(ha*20)/100
Run,%IE%%UR%,,max
sleep,2000
settimer,aaa,1000
return
aaa:
ImageSearch,xf,yf,%x1%,%y1%,%x2%,%y2%, *70 %f1%
if ErrorLevel = 0 ;- Image found
{
SetTimer,AAA,OFF
msgbox, 262208,FOUND,Picture found=`n%name%`nX=%xf% Y=%yf% `nDONE,5
exitapp
}
return
esc::exitapp
;==================================================
noch ein Beispiel mit imagesearch :
[code];- AHK FireFox
;- 1- Speichere zuerst das Bild von Firefox
; Kreis mit Pfeil , oben links wenn Url-Load beendet
;----------------------------------------------------------------------------------------
#warn
#Singleinstance,force
Settitlematchmode,2
Coordmode,pixel
ur:="https://autohotkey.com/boards/"
;IE:=A_programfiles . "\Mozilla Firefox\firefox.exe "
IE:="" ;- default browser
f1=%a_scriptdir%\Reload_Ico.png
SplitPath,f1, name, dir, ext, name_no_ext, drive
wa:=A_screenwidth
ha:=A_screenHeight
;- define a place to search or whole screen
x1 :=(wa*1)/100
y1 :=(ha*1)/100
x2 :=(wa*20)/100
y2 :=(ha*20)/100
Run,%IE%%UR%,,max
sleep,2000
settimer,aaa,1000
return
aaa:
ImageSearch,xf,yf,%x1%,%y1%,%x2%,%y2%, *70 %f1%
if ErrorLevel = 0 ;- Image found
{
SetTimer,AAA,OFF
msgbox, 262208,FOUND,Picture found=`n%name%`nX=%xf% Y=%yf% `nDONE,5
exitapp
}
return
esc::exitapp
;==================================================
[/code]