6 Multi-box for Everquest - key press for non active windows
#1
Posted 11 July 2012 - 06:32 PM
Going off this thread, I think I could modify the code to work for 6 boxing in eq. However, I am new at this and could use a push in the right direction. Basically, what I want to do is push the numpad keys 1-9 and have it do the same key push in the 5 non-active windows. I would then bind those keys to do an in game command with a hotkey for each character. The key press can go to all 5 windows, and I'll just leave the hotkeys blank when I want nothing to happen.
It seems like that shouldn't be too hard to code, but again I don't know coding. Can anyone please help?
#3
Posted 11 July 2012 - 08:23 PM
Imo for something as simple as that, just download HotkeyNet. It's an app specificaly aimed at handling multiple boxes in games and whatnot.
I tried hotkeynet, but there are a few issues with it. First, it can't distinguish between the windows, unless you rename each window, but every time you zone the window names reset, so you have to manually rename them a lot.
But the bigger problem is the key press doesn't always go through. Granted, I only tried it as a 2 box, so I am thinking 6 box would be worse. Having a heal only start some of the time is a problem. So that brought me here.
So, anyone able to help?
Edit: just to further explain why I came here. Hotkeynet has trouble sending to non-active windows on the same PC. The sendwinx command is the only one that works but is unreliable. That program works great for multiple PC's with 1 acccount per, which I am all on a single PC.
<!-- m -->Http://hotkeynet.com/phpBB3/viewtopic.php?f=18&t=1199<!-- m -->
#4
Posted 11 July 2012 - 09:47 PM
WinGet, eqid, List, Everquest
~Num1::
KeyWait Num1
IfWinActive, EverQuest
{
ControlSend,, Num1, ahk_id %eqid1%
ControlSend,, Num1, ahk_id %eqid2%
ControlSend,, Num1, ahk_id %eqid3%
ControlSend,, Num1, ahk_id %eqid4%
ControlSend,, Num1, ahk_id %eqid5%
ControlSend,, Num1, ahk_id %eqid6%
Return
}
~Num2::
KeyWait Num2
IfWinActive, EverQuest
{
ControlSend,, Num2, ahk_id %eqid1%
ControlSend,, Num2, ahk_id %eqid2%
ControlSend,, Num2, ahk_id %eqid3%
ControlSend,, Num2, ahk_id %eqid4%
ControlSend,, Num2, ahk_id %eqid5%
ControlSend,, Num2, ahk_id %eqid6%
Return
}
etc
?
#5
Posted 11 July 2012 - 10:36 PM
#6
Posted 12 July 2012 - 02:34 AM
Note: The hotkey ~Num1:: will not be active because it does not exist in the current keyboard layout.
So I then looked up the key for numpad1, and found it to be {Numpad1}.
I tried putting that in the place of where the Num1 was, and it ran, but did nothing. I think the reason is the name of the application window isn't everquest, it is EQW beta 2.32. So i fired up Window spy to try to figure out what the ahk_class was, and got EQWND. Not knowing exactly the right way to fix this, I tried substituting EQWND into the code so now the code looks like this:
WinGet, eqid, List, EQWND
~Numpad1::
KeyWait Numpad1
IfWinActive, EQWND
{
ControlSend,, {Numpad1}, ahk_id %eqid1%
ControlSend,, {Numpad1}, ahk_id %eqid2%
ControlSend,, {Numpad1}, ahk_id %eqid3%
ControlSend,, {Numpad1}, ahk_id %eqid4%
ControlSend,, {Numpad1}, ahk_id %eqid5%
ControlSend,, {Numpad1}, ahk_id %eqid6%
Return
}But still, nothing happens in the 2nd window. It should activate my hotkey to sit/stand on that character. Any thoughts?
#7
Posted 12 July 2012 - 04:37 AM
WinGet, eqid, List, EQ
~Numpad1::
KeyWait Numpad1
IfWinActive, EQ
{
ControlSend,, {Numpad1}, ahk_id %eqid1%
ControlSend,, {Numpad1}, ahk_id %eqid2%
ControlSend,, {Numpad1}, ahk_id %eqid3%
ControlSend,, {Numpad1}, ahk_id %eqid4%
ControlSend,, {Numpad1}, ahk_id %eqid5%
ControlSend,, {Numpad1}, ahk_id %eqid6%
}
Return
#8
Posted 12 July 2012 - 11:34 PM
If you have any more ideas, I'm open to them. Darn Everquest.
#9
Posted 17 July 2012 - 01:29 PM
IfWinActive, EQIf I recall correctly it should be
IfWinActive, EverQuestIt's caps sensitive.
#10
Posted 17 July 2012 - 07:12 PM
SetTitleMatchMode, 2at the top of your script so you don't have to use the full title to make it work
#11
blackhawk86
Posted 18 October 2012 - 07:11 AM
EQ1 does not seem to like receiving key events while not being the active window. It seems the internal input processing is only done when it is the active window.
Because of that, the following code works and has a few additional features. If you tab out of EQ, I disable certain keys. I am a WSAD person, EQ internally binds these to up, down, left, right, respectively. I have had to disable them as well, using the send command.
I also disable keys after you hit 'r', '/' and 'return' so you are able to type in game.
You could easily reduce the code to be as simple as you like, if this is too much for you.
It will loop through and send key commands to every window (after making them active), then re-set the primary original window to be the active window.
It is not perfect at the moment, I just started messing around with this last night - let me know if it helps.
The methodology/theory of this script is:
1) Switch to all EQ windows through loop(set active win, wait for active to complete, send keystroke in question).
2) Switch back to main window.
Note: This is using autohotkey
Note: I have had to decouple a lot of 'click' events and 'down' events. Thus the huge amount of key entries in this script. They are necessary as the behavior required needs this information.
;Grab unique window ID's
WinGet, eqid, List, EverQuest
; Does this even do anything for this method? Probably not. Kk.
#UseHook On
blockVar := 0
$return::
{
if( checkActive() == true )
{
blockVar := 1
}
Send {Return down}
return
}
$return up::
{
if( checkActive() == true )
{
blockVar := 0
}
Send {Return up}
return
}
$r::
{
if( checkActive() == true )
{
if( blockVar == 0 )
blockVar := 1
}
Send {r 1}
return
}
$/::
{
if( checkActive() == true )
{
if( blockVar == 0 )
blockVar := 1
}
Send {/ 1}
return
}
checkActive()
{
WinGet, eqid, List, EverQuest
Loop, %eqid%
{
this_id := eqid%A_Index%
IfWinActive ahk_id %this_id%
{
return true
}
}
return false
}
forwardKey( key )
{
global eqid
; Block repeat key functions.
BlockInput On
WinGet, active_id, ID, EverQuest
; Clear arrow keys for current windows.
Send {Up up}
Send {Down up}
Send {Left up}
Send {Right up}
Loop, %eqid%
{
this_id := eqid%A_Index%
; Activate EQ window.
WinActivate, ahk_id %this_id%
WinWaitActive, ahk_id %this_id%
; Send Keys
Send {%key% 1}
Send {Up up}
Send {Down up}
Send {Left up}
Send {Right up}
}
; Activate origional EQ window
WinActivate, ahk_id %active_id%
WinWaitActive, ahk_id %active_id%
; Clear Keys
Send {Up up}
Send {Down up}
Send {Left up}
Send {Right up}
BlockInput, Off
}
$1::
{
if( blockVar == 1 || checkActive() == false )
{
Send {1 1}
return
}
forwardKey(1)
return
}
$2::
{
if( blockVar == 1 || checkActive() == false )
{
Send {2 1}
return
}
forwardKey(2)
return
}
$3::
{
if( blockVar == 1 || checkActive() == false )
{
Send {3 1}
return
}
forwardKey(3)
return
}
$4::
{
if( blockVar == 1 || checkActive() == false )
{
Send {4 1}
return
}
forwardKey(4)
return
}
$5::
{
if( blockVar == 1 || checkActive() == false )
{
Send {5 1}
return
}
forwardKey(5)
return
}
$6::
{
if( blockVar == 1 || checkActive() == false )
{
Send {6 1}
return
}
forwardKey(6)
return
}
$7::
{
if( blockVar == 1 || checkActive() == false )
{
Send {7 1}
return
}
forwardKey(7)
return
}
$8::
{
if( blockVar == 1 || checkActive() == false )
{
Send {8 1}
return
}
forwardKey(8)
return
}
$9::
{
if( blockVar == 1 || checkActive() == false )
{
Send {9 1}
return
}
forwardKey(9)
return
}
$0::
{
if( blockVar == 1 || checkActive() == false )
{
Send {0 1}
return
}
forwardKey(0)
return
}
$w::
{
if( blockVar == 1 || checkActive() == false )
{
Send {w 1}
return
}
Send {Up down}
return
}
$w Up::
{
Send {Up up}
return
}
$a::
{
if( blockVar == 1 || checkActive() == false )
{
Send {a 1}
return
}
Send {Left down}
return
}
$a up::
{
Send {Left up}
return
}
$s::
{
if( blockVar == 1 || checkActive() == false )
{
Send {s 1}
return
}
Send {Down down}
return
}
$s up::
{
Send {Down up}
return
}
$d::
{
if( blockVar == 1 || checkActive() == false )
{
Send {d 1}
return
}
Send {Right down}
return
}
$d up::
{
Send {Right up}
return
}
$Up::
{
Send {Up down}
return
}
$Up up::
{
Send {Up up}
return
}
$Down::
{
Send {Down down}
return
}
$Down up::
{
Send {Down up}
return
}
$Left::
{
Send {Left down}
return
}
$Left up::
{
Send {Left up}
return
}
$Right::
{
Send {Right down}
return
}
$Right up::
{
Send {Right up}
return
}
$\::Reload
Pause::Suspend
#12
Posted 22 October 2012 - 01:18 PM
<!-- m -->http://l.autohotkey....ControlSend.htm<!-- m -->




