Jump to content

Recommended Posts

Posted

Hi guys, I've made a "stop watch", trying to find out how long a sword swing action takes in a game. (The game is called "Mount & Blade").

In the script, I use the "m" key to toggle the stop watch.

It works fine in windows, but inside the game, the "m" key doesn't work. (Please note: the "m" key is not used by the game).

Is it because of the DirectX blocking the keystroke being passed to any other program besides the game? Or is it because the script is not "attached" to the game process?

How do I fix this problem?

Thanks in advance.

Here's my stop watch code:

Global $StopWatchStarted=False
Global $begin = TimerInit()

HotKeySet("m", "StopWatch")


While True
    Sleep(100)
WEnd


Func StopWatch()
    $StopWatchStarted = NOT $StopWatchStarted
    If $StopWatchStarted Then
        $begin = TimerInit()
        ToolTip("Stop Watch Started")
    Else
        $dif = TimerDiff($begin)
        ToolTip("Time Difference " & $dif & "ms. Stop watch now off.")
    EndIf   
EndFunc
Posted

The game is blocking it.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

  • 2 weeks later...
Posted

Hi, I am having the same problem but with a slight difference.

The game is Cabal and I am already bypassing the X-Trap game control. I am able to use QMacro with hotkeys assigned to start macros but unable to start execution of AutoIt. Outside of Cabal game, it is ok.

Is there anyway to force AutoIt to catch the keystrokes first?

Thanks in advance.

  • 1 month later...
Posted

try adding in the function

send ("m")

when hotkeyset m is used autoit uses the key for itself and doesn't send it away so you send the m by the script

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...