I want the script to open up notepad.exe, then wait for me to exit/close notepad.exe.
When I exit notepad, I want to check the keystate of the left ctrl key. if down, run a program. if not down then just exit. here is a sample of the script:
Code: Select all
#Persistent
#InstallKeybdHook
Run, notepad.exe
WinWaitClose, Untitled - Notepad
GetKeyState, state, LCtrl
if state = D
{
run "i_view32.exe"
}
else
{
msgbox, "nope"
}
exitapp