민서네집

[Autohotkey] 크롬 브라우저 5분마다 새로고침 하기 본문

Autohotkey

[Autohotkey] 크롬 브라우저 5분마다 새로고침 하기

브라이언7 2017. 11. 8. 07:33

크롬 브라우저에서 어느 웹싸이트의 로그인을 유지하기 위해 5분마다 새로고침하는 스크립트를 만들었다.


;https://autohotkey.com/board/topic/3356-webpage-refresh/


Browser = Microsoft Internet Explorer

;Browser = Mozilla Firefox

SetTitleMatchMode, 2

Menu, TRAY, Tip, Chrome Refresher


Gui, Add, Text, x6 y7 w50 h20, Seconds:

Gui, Add, Edit, x56 y7 w60 h20 +Left vpreSeconds, 300

Gui, Add, Button, x6 y37 w110 h30 gStart, Set Refesh Rate

Gui, Show, x400 y326, Chrome Refresher

Return


Start:

{

Gui, Submit

Seconds := preSeconds * 1000

SetTimer, Refresh, %Seconds%

return

}


Refresh:

{

;ControlSend, , {F5}, %Browser%

  

  ; https://stackoverflow.com/questions/22314925/refresh-the-top-active-tab-with-autohotkey

  WinActivate,ahk_class Chrome_WidgetWin_1

  ControlSend,,{F5},ahk_class Chrome_WidgetWin_1

return

}


GuiClose:

ExitApp



Gui_Refresh_Chrome Refresher.ahk


Comments