forhotc Posted November 18, 2008 Posted November 18, 2008 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
Skrip Posted November 18, 2008 Posted November 18, 2008 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]
Putra Posted November 28, 2008 Posted November 28, 2008 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.
Second Posted January 2, 2009 Posted January 2, 2009 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
FireFox Posted January 2, 2009 Posted January 2, 2009 If HotKeySet doesnt work _IsPressed will certainly work its the best ! Cheers, FireFox.
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