[Autohotkey] 自動click Link
公司有個message system做同事間的聯絡, 不過個system 沒有一個mark as read 功能, 一定要click 入去先可以mark as read. 所以用autohotkey 寫左個程式。
主要是模擬在IE 中 click link 之後 按backspace , 完成左一版click link 後再按refresh. 因為在message page 中有click 過條link 咁佢就可以mark as read 啦.
Code
-----------------
主要是模擬在IE 中 click link 之後 按backspace , 完成左一版click link 後再按refresh. 因為在message page 中有click 過條link 咁佢就可以mark as read 啦.
Code
-----------------
fp_sleep = 2000
fp_link1 = 190
fp_link2 = 230
fp_link3 = 280
fp_link4 = 320
fp_link5 = 370
fp_link6 = 410
fp_link7 = 450
fp_link8 = 490
fp_link9 = 540
fp_link10 = 580
fp_link11 = 630
fp_link12 = 680
fp_link13 = 720
SetTitleMatchMode 2
Msgbox, It only works at Microsoft Internet Explorer and Press F12 to stop the loop.
Loop
{
loop 13
{
GetKeyState, state, F12, P
; The key has been released, so break out of the loop.
if state = D
{
msgbox, The loop is break
exit
}
ifWinActive, Microsoft Internet Explorer
{
x := fp_link%A_Index% - 10
y := fp_link%A_Index%
z := fp_link%A_Index% + 10
;msgbox, %x% %y% %z%
Click 700, %x%
Click 700, %y%
Click 700, %z%
sleep %fp_sleep%
send {BS}
sleep %fp_sleep%
}
}
ifWinActive, Microsoft Internet Explorer
{
send {F5}
}
sleep %fp_sleep% * 3
;Gui, Show, NoActivate X0 Y0, AutoKey is running
}
Exit
Comments