Telegram / Whatsapp messenger restore window / minimize window

Post your working scripts, libraries and tools for AHK v1.1 and older
Sneeuwvos
Posts: 6
Joined: 13 Jan 2018, 05:45

Telegram / Whatsapp messenger restore window / minimize window

18 Jan 2018, 15:03

Hi guys,

Bind this to a macro key or mouse key and make Telegram / Whatsapp popup for you to write a message or minimize it. This way you do not need to restore and minimize the window all the time someone sends you a message you want to read or reply to.

Requires: Telegram or Whatsapp Windows app running.

Code for Telegram

Code: Select all

#SingleInstance ignore

SetTitleMatchMode, 2

IfWinActive, Telegram
{
	WinMinimize
} else {
	WinActivate, Telegram
}
Code for Whatsapp

Code: Select all

#SingleInstance ignore

SetTitleMatchMode, 2

IfWinActive, Whatsapp
{
	WinMinimize
} else {
	WinActivate, Whatsapp
}
Last edited by Sneeuwvos on 18 Jan 2018, 15:58, edited 1 time in total.
gregster
Posts: 9000
Joined: 30 Sep 2013, 06:48

Re: Telegram / Whatsapp messenger restore window / minimize window

18 Jan 2018, 15:11

Well, that's twice the same code - you forgot to change the window title for WhatsApp after copy & paste (but I guess people will figure it out, anyway)
Sneeuwvos
Posts: 6
Joined: 13 Jan 2018, 05:45

Re: Telegram / Whatsapp messenger restore window / minimize window

18 Jan 2018, 15:59

gregster wrote:Well, that's twice the same code - you forgot to change the window title for WhatsApp after copy & paste (but I guess people will figure it out, anyway)
Thanks for mentioning. I had a rough day today unfortunately. I fixed it!

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 99 guests