help with autohotkey with a game

Ask gaming related questions (AHK v1.1 and older)
anil1234
Posts: 4
Joined: 14 Mar 2014, 07:25

help with autohotkey with a game

Post by anil1234 » 14 Mar 2014, 20:21

am using AHK for a game
when i do not run the game the ahk is working perfectly but when i am running the game the AHK does nt seem to be working properly
any suggestions or modifications i should make in the script to change that
(am using windows 8.1 and the game i am playing is forsaken Ragnarok online)
please help!

User avatar
FanaticGuru
Posts: 1908
Joined: 30 Sep 2013, 22:25

Re: help with autohotkey with a game

Post by FanaticGuru » 24 Mar 2014, 15:51

Some games don't like simulated keystrokes. This can be intentional or a side effect of their use of DirectX, DirectInput, etc. that is common in a highly graphical environment like a game.

Things you can try are:
run the game in windowed mode through the games options

add this to the beginning of scripts

Code: Select all

#InstallKeybdHook	; Helps AutoHotkey function better with some games.
#UseHook			; Helps AutoHotkey function better with some games.
or this

Code: Select all

SendMode, Play
or this

Code: Select all

SendMode, Input
or some combination.

If the game is intentional attempting to prevent scripting then it can be very difficult to circumvent.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

_3D_
Posts: 277
Joined: 29 Jan 2014, 14:40

Re: help with autohotkey with a game

Post by _3D_ » 04 Apr 2014, 12:26

Try this http://www.autohotkey.com/board/topic/9 ... -tool-v32/
you can find working model.
AHKv2.0 alpha forever.

User avatar
evilC
Posts: 4824
Joined: 27 Feb 2014, 12:30

Re: help with autohotkey with a game

Post by evilC » 09 Jun 2014, 15:26

Many games require a key to be held for a certain amount of time.

Try adding this line to the start of your script:

SetKeyDelay, 0, 50

You might need to use higher values (eg 100).

Also, some games require that the script is running as admin in order to receive keystrokes.

See this post for info on solving admin-related issues:
http://ahkscript.org/boards/viewtopic.p ... 464#p19464

Girlgamer
Posts: 12
Joined: 03 Jun 2014, 14:52

Re: help with autohotkey with a game

Post by Girlgamer » 14 Jun 2014, 06:40

If the version of Ragnarok you're playing has a hackshield that may cause problems also if the game is run in True Fullscreen mode (you can tell if there is no top border) that can also be problematic. If you have hotkeys that conflict with in-game keybindings, that can be an issue as well. And, if you are running multiple scripts simultaneously you could get conflicts there also.

When you say "doesn't work properly" that leaves it pretty much up to the responder's imagination what is actually happening.

Post Reply

Return to “Gaming Help (v1)”