Skip to content

Instantly share code, notes, and snippets.

@vnau
Last active June 23, 2018 09:18
Show Gist options
  • Save vnau/f7ab1efd95f7c42065616e562ad094f8 to your computer and use it in GitHub Desktop.
Save vnau/f7ab1efd95f7c42065616e562ad094f8 to your computer and use it in GitHub Desktop.
Скрипт AutoIt для скрытия рекламных баннеров при старте и закрытии ДубльГис / AutoIt script to hide 2gis splash screens
$ProgramFilesDir = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
Run($ProgramFilesDir & "\2gis\3.0\grym.exe")
; Close start banner
Local $hWnd1 = WinWait("[REGEXPTITLE:(?i)(.* - Городская информационная система 2ГИС)]")
While Not ControlCommand($hWnd1,"","Button1","IsEnabled",'')
Sleep(100)
WEnd
WinClose($hWnd1)
; Hide banners
Local $hWnd1 = WinWait("[REGEXPTITLE:(?i)(.* - 2ГИС)]")
WinWaitActive($hWnd1)
Sleep(3000)
ControlHide($hWnd1, "", "[CLASS:Grym_ToolbarBanner]")
ControlHide($hWnd1, "", "[CLASS:Grym_MainBanner]")
; Close end banner
Local $hWnd = WinWait("2ГИС")
WinClose($hWnd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment