Skip to content

Instantly share code, notes, and snippets.

@sftblw
Last active April 20, 2018 04:27
Show Gist options
  • Save sftblw/427d0ae1694dacaebe768248a5712899 to your computer and use it in GitHub Desktop.
Save sftblw/427d0ae1694dacaebe768248a5712899 to your computer and use it in GitHub Desktop.
Nateon Advertisement Closer (KOR)
; https://autohotkey.com/board/topic/21533-multiple-winwait-at-once/
gosub, NateOnCloseOnStartup
loop {
gosub, NateOnCloseInfo
gosub, NateOnClosePopupAd
}
; close NateOn bootup Once
NateOnCloseOnStartup:
{
WinWait, NateOn
WinClose, NateOn
}
return
; close NateOn "Info" and following Internet Explorer open
NateOnCloseInfo:
{
WinWait, 네이트온 안내
WinClose, 네이트온 안내
; wait for 10 sec for closing following IE
WinWait, 네이트 - Internet Explorer, , 10
WinClose, 네이트 - Internet Explorer
}
return
; close Popup Advertisement, checking by window size.
; Messenger dialog can't be 240 x 135
NateOnClosePopupAd:
{
WinWait, ahk_exe NATEONMain.exe, , , NateOn,
WinGetPos, , , Width, Height, ahk_exe NATEONMain.exe, , NateOn,
if (Width = 240 and Height = 135) {
WinClose, ahk_exe NATEONMain.exe, , , NateOn,
}
}
return

Nateon Advertisement Closer

These autohotkey scripts close ads of NateOn messenger.

memo: shell:startup

todo

  • merge to one file
  • make install & uninstall script
  • pretty GUI
Loop {
WinWait, 네이트온 안내
WinClose, 네이트온 안내
; wait for 10 sec for closing following IE
WinWait, 네이트 - Internet Explorer, , 10
WinClose, 네이트 - Internet Explorer
}
;SetTitleMatchMode, RegEx
Loop {
WinWait, ahk_exe NATEONMain.exe, , , NateOn,
WinGetPos, , , Width, Height, ahk_exe NATEONMain.exe, , NateOn,
if (Width = 240 and Height = 135) {
WinClose, ahk_exe NATEONMain.exe, , , NateOn,
}
}
;ahk_exe NATEONMain.exe
;x: 1662 y: 945 w: 240 h: 135
;Client: w: 240 h: 135
; close NateOn bootup Once
WinWait, NateOn
WinClose, NateOn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment