Has anyone got AHK to work with DOSBOX?

Ask gaming related questions
Kasper Hviid
Posts: 2
Joined: 10 Jan 2016, 12:23

Has anyone got AHK to work with DOSBOX?

10 Jan 2016, 12:30

I can't seem to get my AHK script to work with my dosbox games. Has anyone any experience here? I tried searching, but couldn't find any helpful post about this.
User avatar
SnowFlake
Posts: 368
Joined: 28 Apr 2015, 05:41
Google: floowsnaake
GitHub: floowsnaake
Contact:

Re: Has anyone got AHK to work with DOSBOX?

10 Jan 2016, 13:49

Hey i just tried this script and it works for me:

Code: Select all

IF NOT A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"
   ExitApp
}

#SingleInstance Force

MButton::
Send, {Tab down}
Sleep, 200
Send, {Tab Up}
return
:yawn:
demon646
Posts: 1
Joined: 20 Jan 2016, 17:30

Re: Has anyone got AHK to work with DOSBOX?

20 Jan 2016, 19:25

do you have to add the:

Code: Select all

MButton::x
Send, {Tab down}
Sleep, 200
Send, {Tab Up}
return
Code for every button?
User avatar
evilC
Posts: 4781
Joined: 27 Feb 2014, 12:30

Re: Has anyone got AHK to work with DOSBOX?

21 Jan 2016, 06:41

You can put SetKeyDelay, 0, 200 at the start of the script to remove the need to put a sleep between the down and up event.

Is this valid code?

Code: Select all

MButton::x
Send, {Tab down}
Sleep, 200
Send, {Tab Up}
return
Doing MButton::x, then proceeding on subsequent lines with Sends doesn't seem right, but I could be wrong.

I would use more like:

Code: Select all

SetKeyDelay, 0, 200
MButton::
   Send {x}{Tab}
   return
Of course, this would mean that x is held for 200ms as well as Tab being held for 200ms

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 14 guests