Basically want to make a macro script
Casey via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Nov 13 13:56:46 PST 2014
On Thursday, 13 November 2014 at 16:04:43 UTC, Adam D. Ruppe
wrote:
> On Thursday, 13 November 2014 at 07:01:08 UTC, Rikki Cattermole
> wrote:
>> I did find this [0]. I don't know what state its in for
>> compilating/running ext. But it might give you a good starting
>> point.
>>
>> [0] https://github.com/pythoneer/XInputSimulator
>
> ooh there's some nice code for Linux in there! The Windows is
> only half implemented though... but this combined with my
> Windows code should get you enough example to write a
> cross-platform thing if you need it.
Thank you so much! I really appreciate this! But I have a few
questions.
1) Which compiler should I use? I'm attempting to use the DM D
comiler, but afaik it doesn't have a GUI and I can't make any
sense of how to use it otherwise. I'll look up a tutorial on it
if this is the one you recommend. If it's not the one you
recommend, I'll give yours a try.
2) I can't figure out what the heck half of this code means. It
seems that at the bottom you have what each of the hotkey buttons
are, and I can see a few times where you referenced them. I can
also see a efw listeners for the keybinds to be pressed, and then
where you use the writeln command. Other than that, I can't tell
what's going on. I feel like a noob, sorry that I don't
understand this.
3) I'm sure that everything you have in there has a meaning, but
it looks over complicated to me. Shouldn't it look something
like this?
[code]
void main() {
import std.stdio;
import simpledisplay;
import *Others that need to be imported*;
if (*hotkey command here*) {
then writeln ("We're losing Alpha!")
return 0;
}
[/code]
I know there's a /LOT/ more to it than that, but wouldn't that be
the basics? I honestly don't know a whole lot about what you
did, but at least I understand the basic concept of programming.
I'm going to start looking up a few tutorials on compiling using
the DM D compiler, let me know if you recommend a different one.
Could you tell me which keys you used for the hotkey in your
sample code? I can't figure it out, but my guess it alt + c?
Not sure though.
Thanks again, I am really impressed with you for actually writing
the basic concept of it for me! I can diffidently use this for
my building block of learning how to program better!
More information about the Digitalmars-d-learn
mailing list