Code: Select all
SendMode Input
SetWorkingDir %A_ScriptDir%
$*lShift::
Loop
{
if not GetKeyState("lShift","P")
break
{
Sleep 020
Send {Space down}
Sleep 020
Send {Space up}
sleep 020
Send {d down}
Sleep 020
Send {Space down}
Sleep 020
Send {2 down}
Sleep 020
Send {2 up}
Sleep 020
Send {d up}
Sleep 020
Send {Space up}
Sleep 020
}
}
return
#NoTrayIcon
#NoEnv
#persistent
#singleinstance force
i want to. if a game client "Game Clien" and "Untitled - Notepad" are opend the script works but if one of them are closed it should not to send any command anymore untill its opened again.