Sending keystrokes to EQ with SendKeys (Python)

zdozbou

EQ Knowledge King
Joined
Sep 6, 2007
Messages
1,604
Reaction score
4
Points
38
I've been building a Python script to do some various things, and I'm trying to use SendKeys to send keystrokes to EQ. I'm having limited luck - numbers and letters work fine, but hardly anything else will work. Slashes, commas, periods etc - none of these will correctly work.

I know the script is properly sending them, as I can open a text editor and the keystrokes register in that. Anyone have any experience and/or advice?
 
just don't do this?

Why do you need to send keystrokes to EQ?
-> to call an EQ function? Import that function and call it directly.
-> to call some MQ2 function? ^^

Somewhere on the MQ2 board was a plugin that at least in the past, worked fine, and embeds a python interpreter into EQ. It had it's own eval window, you could run scripts, etc. If you really must use python, try that - it would be like replacing the .mac part of MQ2 with .py
 
Last edited:
Well, mostly because I'm teaching myself Python, and I learn best by just doing, rather than seeing. I'm not building a project I plan to use long term, just playing around.

Thanks for the advice anyhow.
 
Last edited:
I'm no expert but I believe SendKeys it self is not reliable. Some games go out of their way to make sure it does not work.
 
What dewey said. I don't recall specifics but I looked at sendkeys and other programs to automate sending keystrokes to EQ windows and they don't work. I think the EQ code has specific traps for that kind of keystroke transmission and it blocks it---or, rather, entirely ignores it. I use programmable hardware, which perfectly mimics keyboards and that communication works perfectly.

It's a conundrum fer sure. I wish there was a way because I had plans to design some very useful programs using sendkeys or similar software.
 
Last edited:
If I recall correctly from way back in like early 2000s when I messed around with this stuff prior to using MQ2, EQ uses direct input from direct x to get it's key presses. SendKeys, window messages and such does not work to emulate this. To emulate keypresses like that, you'd have to hook into the directx library and emulate them through there.

Of course I could be completely remembering incorrectly or thinking about another game, it has been like 15 years :p