Greetings all; longtime AutoHotKey user, first time poster. I first found AHK because I wanted a way to close TeamViewer nag screens easily and automatically. Since then I've found loads of other great uses, but I realized I never did share the solution/script I made for that original purpose. Luckily it means I've tested this script for years, so it's nicely durable. More good news: I comment my code liberally.
As my lengthy intro comments state, I LOVE TeamViewer. This script isn't to rip them off; it's to make up for their skewed license prices. Read the full script comments to understand my position.
enjoy! // comments/improvements welcome
; Much though I love TeamViewer, their pricing scheme is baffling and unapproachable. ; At "only" $750 for their cheapest license (down from $1,000, and that's a license ; for ONE computer) they are clearly not interested in non-corporate/non-profit customers. ; This leaves those of us in the educational and art worlds forced to deal with their ; pesky "sponsored session" nag screen. This window never times out and requires a human ; on the remote end to press a key or click a mouse to remove it -- a dealbreaker for use ; with standalone art installations like the ones I and my students create, and in other ; contexts. ; What a shame. TeamViewer has always impressed me, winning me over instantly from ; all previous VNC/remote desktop clients I'd used. I want to buy it, but it's more ; expensive than the high-end PC I purchased this week, and more expensive than my two ; most-used software packages -- Ableton Live and MaxMSP -- COMBINED. After years of ; high TeamViewer-like prices, MaxMSP has now embraced pricing that accommodates users ; in education and even offers students a special one-year license. ; ; TeamViewer, I am asking you as a dedicated user of your product to do the same. ; ; This script will kill the nag each time it appears. It also maps Windows + T ; (press & hold the Windows key, then T) to start TeamViewer and put focus on the Partner ; List window. Arrow up/down to the partner computer; Enter is mapped to start a remote ; session with it. Lastly, Escape is mapped to close the TeamViewer window (but not ; exit TeamViewer). Note that the ControlClick coordinates may need to be changed to ; match your Windows display settings -- use Window Spy and hover over the button to ; click and replace the ControlClick numbers with the "In Active Window" Mouse Position ; numbers. ; ; - TradeMark Gunderson / 2014.07.30 #Persistent SetTimer, CloseTeamviewerNag, 250 SetTitleMatchMode 2 ; Matches as substring of full title #t:: ; TeamViewer Run, "%ProgramFiles%\TeamViewer\Version9\TeamViewer.exe", , UseErrorLevel If ErrorLevel = ERROR Run, "%ProgramFiles% (x86)\TeamViewer\Version9\TeamViewer.exe" WinActivate, TeamViewer WinWait, TeamViewer, , 5 WinActivate, TeamViewer ; For some reason, WinWait, TeamViewer, , 5 ; it helps to do these twice IfWinNotExist, Computers & Contacts ; Open the partner computer list ; ControlClick, Computers & Contacts ; ...but they took away the button text! ControlClick, x500 y565 ; so poke where the button should be ControlClick, x450 y406 ; or where else it might be WinActivate, Computers & Contacts WinWait, Computers & Contacts, , 5 ControlClick, x50 y200 ; This location used to work for me, but ControlClick, x40 y144 ; now it's this, maybe for higher Windows text DPI return #y:: ; TeamViewer WinActivate, TeamViewer WinWait, TeamViewer, , 5 IfWinNotExist, Computers & Contacts ; Open the partner computer list ; ControlClick, Computers & Contacts ; ...but they took away the button text! ControlClick, x500 y565 ; so poke where the button should be ControlClick, x450 y406 ; or where else it might be WinActivate, Computers & Contacts WinWait, Computers & Contacts, , 5 ControlClick, x50 y200 ; This location used to work for me, but ControlClick, x40 y144 ; now it's this, maybe for higher Windows text DPI return #IfWinActive Computers & Contacts Enter:: ; Make the Enter key start the TeamViewer session Send {AppsKey}{Tab 4}{Down}{enter} return Escape:: ; Make the Escape key close the TeamViewer window WinClose, TeamViewer return #IfWinActive TeamViewer ahk_class #32770 Escape:: ; Make the Escape key close the TeamViewer window WinClose, TeamViewer return #IfWinActive CloseTeamviewerNag: IfWinExist, Sponsored session ; Argh! kill it Kill It KILL IT! { ControlClick, OK WinClose, TeamViewer return } return