Last active
June 23, 2018 09:18
-
-
Save vnau/f7ab1efd95f7c42065616e562ad094f8 to your computer and use it in GitHub Desktop.
Скрипт AutoIt для скрытия рекламных баннеров при старте и закрытии ДубльГис / AutoIt script to hide 2gis splash screens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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