i think this code might be useful to others
also if you have better way do share...
Code: Select all
#SingleInstance force
SetTitleMatchMode,2
SetTitleMatchMode, fast
#WinActivateForce
^+W::
IfWinExist, WhatsApp
{
WinActivate WhatsApp ; use the window found above
if ErrorLevel
MsgBox,,,,1
return
}
else
{
ifWinExist Firefox
{
WinActivate
Sleep, 5
Send ^1
Sleep, 5
IfWinNotExist, WhatsApp
{
Sleep, 5
WinActivate Firefox
Sleep, 5
Send ^2
IfWinNotExist, WhatsApp
{
WinActivate Firefox
Sleep, 5
Send ^3
Sleep, 5
IfWinNotExist, WhatsApp
{
WinActivate Firefox
Sleep, 5
Send ^4
Sleep, 5
IfWinNotExist, WhatsApp
{
WinActivate Firefox
Sleep, 5
Send ^5
Sleep, 5
IfWinNotExist, WhatsApp
{
WinActivate Firefox
Sleep, 5
Send ^6
Sleep, 5
IfWinNotExist, WhatsApp
{
WinActivate Firefox
Sleep, 5
Send ^7
Sleep, 5
IfWinNotExist, WhatsApp
{
WinActivate Firefox
Sleep, 5
Send ^8
Sleep, 5
IfWinNotExist, WhatsApp
{
WinActivate Firefox
Sleep, 5
Send ^9
Sleep, 5
}
}
}
}
}
}
}
}
}
}
return
{
Run, C:\Users\A1\AppData\Local\WhatsApp\app-2.2222.12\WhatsApp.exe,
if ErrorLevel = ERROR
MsgBox,,,,1
}
return