Reputation: 4206
I want to use AutoHotkey to run a program and send some keystrokes. But I don't get it to work. The program pops up, and then nothing happens.
Here is what I have so far:
run, c:\windows\sysnative\gfxv4_0.exe
WinActivate, "Intel(R) Graphics Control Panel"
SendInput {Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}
Just for testing, I have also tried to send some keys to notepad, but that doesn't work either. The notepad window pops up, but then nothing:
run notepad.exe
WinActivate "Unbenannt - Editor"
SendInput abc{Tab}{Tab}xyz
I have also tried WinActivate
without parameters, but no results either. Have also tried with Send
, SendPlay
, SendEvent
and SendRaw
. No change.
System is Windows 8.1 64 Bit, latest Service Packs. Core i7, 8 GB, 2 screens.
Upvotes: 0
Views: 1188
Reputation: 73836
WinActivate, % "some string"
Wait for the window to appear before activating it because launching an application takes time:
WinWait Intel(R) Graphics Control Panel
Maybe there's ® instead of (R). Use the exact window title text from Window Spy application that comes with AutoHotkey.
Upvotes: 1