Basically want to make a macro script
Casey via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Nov 11 20:56:39 PST 2014
/Long/ story short, I want to pretty much make a macro using this
program. I don't really have time to explain in further detail
at the moment, but /no/ macro program out there will do what I'm
trying to do. I want to basically make it so that when I press a
hotkey, it'll send an in game chat message. Here's my code for
the popular program AutoHotKey.
[code]
Numpad0 & Numpad1::
Send {k down}
Sleep 1
Send {k up}
SendInput We're losing Alpha{!}
SendInput {Enter}
Return
[/code]
That's a small sample of my script, but the only thing that would
change with the rest of my script would be the message sent and
the keybind to press it.
Basically what it's doing is listening for my hotkey to be
pressed (in this particular example it's numpad 0 + numpad 1 for
the message, "We're losing Alpha!", and so on and so forth for
the rest of the numbers.) and then activating the chat button in
game (in this particular examle it's k for team chat), then
sending the actual message as quickly as possible, and sending
it. Works perfectly in BF4, but PB (PunkBuster), the default
anti cheat system that BF4 uses will kick me if the admins have
that setting enabled.
I've been wanting to learn full on programming for a while, and
I've heard a lot of things about D and how it's a pretty good
starting point, and how it has a huge potential to expand you
into anything. Plus it's supposed to be pretty efficient and the
next big thing in the programming world, so there's that.
Just for the record, I don't have a lot of experience with
programming. I've done it years ago (had an instructor for a Boy
Scout Merit Badge class), but I didn't even know which language I
was typing in. I assume it was Python, but I can't be sure.
Whatever I make I want it to be somewhat compatible with Linux
eventually. I just want to start with a binary .exe, but I do
want my code to be compatible with Linux if I choose to compile
it for Linux at a later date. I don't think this should be an
issue, but I just wanted to throw this out there.
I'm not sure which libraries I need for this, but as far as I
know I just need the following:
Keybind listener/hotkey
Keyboard emulating/low level chat producing library
something that /wont/ be picked up as a hack/cheat by /ANYTHING/.
I don't think this should be that hard to make, but D doesn't
really have much documentation out there as far as I can tell, so
I figured this would be the best place to put this.
The sooner the better please. Thanks for any/all help I receive.
More information about the Digitalmars-d-learn
mailing list