DualBoxing or something similar

Ask gaming related questions (AHK v1.1 and older)
iNero18
Posts: 3
Joined: 16 Jul 2023, 00:04

DualBoxing or something similar

18 Jul 2023, 02:38

uenas to all I'm New around here and wanted to know if someone is so kind to answer me something.
I want to create a macro that when activated Copy in real time the keys I use in 2 different windows,
that is, in Window 1 I press 5 and in Window 2 I press equally. It would be like a key copier

I do not get something similar or at least a name or where I can research to create one, or if someone has one if I would be so kind to contribute me?
half of AHK but I'm starting
From already thank you very much and I hope even a tip for how to start

Try this macro. but it doesn't work for me with the W or S or A or D

Code: Select all

WinGet, wowid, List, Trove
~w::
KeyWait w
IfWinActive, Trove
{ 
    SendInput, {w down}, ahk_id %wowid2%
    Return
}

~w up::
IfWinActive, Trove
{
    SendInput, {w up}, ahk_id %wowid2%
    Return
}


~s::
KeyWait s
IfWinActive, Trove
{ 
    ControlSend,, {s down}, ahk_id %wowid2% 
    Return
}
~s up::
IfWinActive, Trove
{ 
    ControlSend,, {s up}, ahk_id %wowid2% 
    Return
}
~a::
KeyWait a
IfWinActive, Trove
{
ControlSend,, a, ahk_id %wowid2%
Return
}
~d::
KeyWait d
IfWinActive, Trove
{
ControlSend,, d, ahk_id %wowid2%
Return
}
~Space::
KeyWait Space
IfWinActive, Trove
{ 
ControlSend,, {Space}, ahk_id %wowid2% 
Return
}
 
~Tab:: 
KeyWait Tab 
IfWinActive, Random
{ 
ControlSend,, {Tab}, ahk_id Trove
Return
}

[Mod action: Moved topic to from “Ask for Help (v2)” because this is v1 code and it is for a game.]

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
User avatar
mikeyww
Posts: 28871
Joined: 09 Sep 2014, 18:38

Re: DualBoxing or something similar

18 Jul 2023, 05:19

Hello,

I would start with a new, shorter test script just to see if you can get your ControlSend command to work.

Code: Select all

#Requires AutoHotkey v1.1.33
winTitle := "Trove"
; winTitle := "ahk_exe notepad.exe"

#If WinActive(winTitle)
~s::
WinGet wowid, List, % winTitle
ToolTip % "===> " wowid2 " <==="
ControlSend,, s, ahk_id %wowid2%
SoundBeep 1500
Return
#If
If you are new to AutoHotkey, you might want to consider using v2 instead of this older version.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Rookieahk and 44 guests