Jump to content

HotKeySet() and Camelot

Recommended Posts

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()
    SoundPlay("amazonstatue_hit3.wav", 1)
    HotKeySet("{PRINTSCREEN}", "MyExit")

    while 1 = 1
        Sleep( 100 )

; Exit the script.  Called by the the HotKeySet binding at the top of the program.
Func MyExit()
    SoundPlay("sorccast2.wav", 1)

; Call the main function

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?



Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...