Guest Berean Posted January 31, 2005 Share Posted January 31, 2005 I can't seem to get HotKeySet() to work with Dark Age of Camelot. Send() works fine, however. I've created a lot of scripts with AutoIt3, and have had no problems getting HotKeySet() to work with other applications. Here's a simple script to isolate the behavior: Global $gWindowName = "Dark Age of Camelot, Copyright © 2001-04 Mythic Entertainment, Inc." ; Main function. Func MyMain() WinWaitActive($gWindowName) SoundPlay("amazonstatue_hit3.wav", 1) HotKeySet("{PRINTSCREEN}", "MyExit") while 1 = 1 Sleep( 100 ) wend EndFunc ; Exit the script. Called by the the HotKeySet binding at the top of the program. Func MyExit() SoundPlay("sorccast2.wav", 1) Exit EndFunc ; Call the main function MyMain() MyExit() After activating the window and hearing the first sound play (right before HotKeySet() is called), pressing the {PRINTSCREEN} key (or any other valid key I try to use) has no effect. The game will see the keypresses but AutoIt3 will not. If I click out into another window (when I run the game in Windowed mode -- this same behavior happens full-screen or windowed) and then press PRINTSCREEN the script function MyExit() will execute. Any thoughts? Thanks, B. Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now