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