ein Beispiel mit Chrome-browser > search for a word and then rightclick
Code: Select all
;- example for chrome > search for a word and then rightclick
setworkingdir,%a_scriptdir%
setbatchlines -1
CoordMode,Pixel
Coordmode,mouse
rgb1:= 0xFF9632 ;- orange color from founded marked word (ctrl+f) in browser chrome / check color with window spy
;-
word:="Ich kann nunmehr die markierte Zeile"
;-
xx:=100,WA:=A_screenwidth,HA:=A_screenheight
x1:=(WA*0)/xx,y1:=(HA*0)/xx,w1:=(WA*80)/xx,h1:=(HA*90)/xx ;- example , search in this aera in percent > x1=0 y1=0 w1=80% h1=90%
run,https://www.autohotkey.com/boards/viewtopic.php?f=9&t=118372
return
;----------------------
$F8::
send,^f ;- search in browser chrome for "%word%"
send,%word%{enter}
sleep,900
PixelSearch,x,y,x1,y1,w1,h1, rgb1, 5, Fast RGB ;- search for color rgb1
If ErrorLevel=0
{
x2:=x+5,y2:=y+5
mousemove,%x2%,%y2%,0
sleep,500
MouseClick right
tooltip,Right-CLICKED %word%
sleep,1900
tooltip
}
return
;-----------
esc::exitapp
;===========================================================
oder , klicke auf markierten Text
Code: Select all
;- click on marked text
setworkingdir,%a_scriptdir%
setbatchlines -1
CoordMode,Pixel
Coordmode,mouse
;rgb1:= 0xFF9632
rgb1:= 0x318EFD ;- blue color for marked text
xx:=100,WA:=A_screenwidth,HA:=A_screenheight
x1:=(WA*0)/xx,y1:=(HA*0)/xx,w1:=(WA*80)/xx,h1:=(HA*90)/xx ;- search in this aera
run,https://www.autohotkey.com/boards/viewtopic.php?f=9&t=118372
return
;----------------------
$F8::
clipboard=
Send ^c
sleep,900
PixelSearch,x,y,x1,y1,w1,h1, rgb1, 5, Fast RGB ;- search for color rgb1
If ErrorLevel=0
{
x2:=x+5,y2:=y+5
;mousemove,%x2%,%y2%,0
;sleep,500
click,%x2% %y2%
msgbox, 262208, ,CLICKED on > "%clipboard%"`n X2=%x2% and Y2=%y2%
clipboard=
}
return
;-----------
esc::exitapp
;===========================================================