Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dragonfly/Vocola Macro Recorder

24 views
Skip to first unread message

gregor...@yahoo.com

unread,
Dec 13, 2013, 10:38:24 PM12/13/13
to
Here we go...

John Doe

unread,
Dec 13, 2013, 10:56:27 PM12/13/13
to
Well there you go.

Thank you for not using Google Groups.

gregor...@yahoo.com

unread,
Dec 13, 2013, 11:05:21 PM12/13/13
to
LOL...right on.

John Doe

unread,
Dec 13, 2013, 11:14:08 PM12/13/13
to
Window switching appears to be easy. All you have to do is hold the
Alt modifier key. That unlocks the thing. Then you set the foreground
window. Then release the alt key. The programmer I got that from made
one trivial mistake. He wanted to do the good programmer thing and
check key state and stuff before releasing the alt key. But you don't
want to do that because it might interfere with releasing the Alt
key, and because releasing a key does no harm anyway. There's no good
reason to condition releasing the Alt key. So you simply release the
key.

gregor...@yahoo.com

unread,
Dec 14, 2013, 12:48:10 AM12/14/13
to
I'm not quite sure what you're referring to here. Could you start at
the beginning?

John Doe

unread,
Dec 15, 2013, 4:22:37 AM12/15/13
to
How do you add a definition to (globals.cpp)?

I can delete most of the contents of (globals.cpp) and the project
rebuilds without errors. But if I remove a semicolon from the end of
a line, it throws an error.

Anyways... I'm unable to add a definition.

Thanks.

Mr. G

unread,
Dec 15, 2013, 6:11:37 PM12/15/13
to
>How do you add a definition to (globals.cpp)?
You have to also add it to globals.h but with the "extern" keyword.
Be sure to initialize any globals you add to globals.cpp that you want
to be shared with other processes because otherwise they won't get
shared even though they're in the shared segment. The way that the
program knows that the segment should be shared is through the linker
directive where you see "RWS", which means "read write shared".

I've been researching the system tray thing, and I think I know what
I'm going to do but it'll take some time to get there.

Mr. G

John Doe

unread,
Dec 15, 2013, 6:58:14 PM12/15/13
to
Mr. G <gregorys12003 yahoo.com> wrote:

>>How do you add a definition to (globals.cpp)?

> You have to also add it to globals.h but with the "extern"
> keyword.

Sure, like all the others are prefixed that way.

> Be sure to initialize any globals you add to globals.cpp that
> you want to be shared with other processes

This is what I'm trying to define for the keyboard hook...

int Lastbrace = ')';

Before, it went at the top of the DLL with all the other
definitions.

> I've been researching the system tray thing, and I think I know
> what I'm going to do but it'll take some time to get there.

Yours compiles a lot faster than my previous
outline/configuration. Also, I got the debug output to show up in
Visual Studio. Might be easy for you, but lucky for me. Apparently
I have to switch out of the IDE to another window before using the
recorder with debug output showing up, but that's no big deal.

At some point, I need to know which files to use as the standalone
program. I haven't looked, but I guess that requires compiling it
for Release?

Thanks.

John Doe

unread,
Dec 15, 2013, 7:16:58 PM12/15/13
to
Mr. G <gregorys12003 yahoo.com> wrote:

> I've been researching the system tray thing, and I think I know
> what I'm going to do but it'll take some time to get there.

Again...

If you're satisfied with using the keypad ON/OFF to help with
recording, please consider including an indicator about whether
the numeric keypad is on or off.

The numeric keypad has been consistently useful for adding various
pause values during recording. During a recording is the best time
to add pause because that's when you know how likely it's needed.
Takes some serious concentration (for me), but it works.

But just knowing that it's recording would be a good start.

Thanks.

John Doe

unread,
Dec 15, 2013, 10:08:55 PM12/15/13
to
Nevermind, I got it.

Mr. G

unread,
Dec 16, 2013, 3:14:03 AM12/16/13
to
>If you're satisfied with using the keypad ON/OFF to help with
>recording, please consider including an indicator about whether
>the numeric keypad is on or off.
An ON/OFF indicator on a system tray bubble, in addition to the
"Recording In Progress" indicator?

>The numeric keypad has been consistently useful for adding various
>pause values during recording. During a recording is the best time
>to add pause because that's when you know how likely it's needed.
>Takes some serious concentration (for me), but it works.
>
>But just knowing that it's recording would be a good start.
Yes, I had asked you about this before but I don't know that you
noticed. It appeared that pressing numeric keypad keys was outputting
various numeric values (other than the values they normally would
represent).

Mr. G

John Doe

unread,
Dec 16, 2013, 9:36:05 AM12/16/13
to
Mr. G <gregorys12003 yahoo.com> wrote:

>>If you're satisfied with using the keypad ON/OFF to help with
>>recording, please consider including an indicator about whether
>>the numeric keypad is on or off.

> An ON/OFF indicator on a system tray bubble, in addition to the
> "Recording In Progress" indicator?

Yes. A big as possible green or red circle like the Naturally
Speaking icon when it is listening, with BIG text inside of it
either "ON" or "OFF" (for numeric keypad state), would IMO be
ideal. (I see that DNS icon when DNS is minimized to the system
tray.)

I'm in no hurry either, but these posts never go away...

After getting used to the radical change of having the hooks in
your outline/frame, I will finish doing the window switching thing
(the trivial stuff is taking me a lot of research, as usual).

Also useful will be the option of entering a string of text that
shows up between quotation marks on one line instead of the usual
recording of one character per line. One character per line is
typical, but the exception should be provided for.

And then there is holding the control key to signify recording
mouse actions in the window instead of the screen...

There should be (get mouse position) and (set mouse position)
functions. Those are in fact useful. But those probably would be
for an extension in Python, so I won't do that. I enjoy getting and
setting the mouse position at the beginning and end of most scripts
that move the pointer around.

You can remove the mouse repositioning commands (for switching to
another window) simply by deleting or commenting out the two
iterations of this line...

strcat(Script," SetMousePosition(1,100,100) WAIT(10) \n");

Let me know (at any time) when my talk has given you the impression
that I've done enough with the hook that you should update yours. I
have changed the formatting a little bit (including of course the
comments) but you can change it back if you have the time. At the
moment, I think your version current. I will try to leave stuff
outside of the key and mouse hook alone. I...WILL...TRY...

John Doe

unread,
Dec 16, 2013, 9:40:56 AM12/16/13
to
BTW, I removed the Unicode code.

John Doe

unread,
Dec 16, 2013, 12:10:21 PM12/16/13
to
> your outline/frame

Of course it's more than that.
FWIW... Until things change, I will plan on referring to your stuff
as "the project" and my stuff as "the hooks", when necessary.

Mr. G

unread,
Dec 16, 2013, 10:57:40 PM12/16/13
to
>Yes. A big as possible green or red circle like the Naturally
>Speaking icon when it is listening, with BIG text inside of it
>either "ON" or "OFF" (for numeric keypad state), would IMO be
>ideal. (I see that DNS icon when DNS is minimized to the system
>tray.)
I'll first get some kind of tray bubble happening, then we can go from
there.

>After getting used to the radical change of having the hooks in
>your outline/frame, I will finish doing the window switching thing
>(the trivial stuff is taking me a lot of research, as usual).
Yes, programming is such a black art.

>Also useful will be the option of entering a string of text that
>shows up between quotation marks on one line instead of the usual
>recording of one character per line. One character per line is
>typical, but the exception should be provided for.
I'm confused as to what you're talking about here.

>And then there is holding the control key to signify recording
>mouse actions in the window instead of the screen...
Hmm...remind me later on this.

>There should be (get mouse position) and (set mouse position)
>functions. Those are in fact useful. But those probably would be
>for an extension in Python, so I won't do that. I enjoy getting and
>setting the mouse position at the beginning and end of most scripts
>that move the pointer around.
>
>You can remove the mouse repositioning commands (for switching to
>another window) simply by deleting or commenting out the two
>iterations of this line...
>
>strcat(Script," SetMousePosition(1,100,100) WAIT(10) \n");
Yeah, I need to refamiliarize with all this mouse stuff.

>Let me know (at any time) when my talk has given you the impression
>that I've done enough with the hook that you should update yours. I
>have changed the formatting a little bit (including of course the
>comments) but you can change it back if you have the time. At the
>moment, I think your version current. I will try to leave stuff
>outside of the key and mouse hook alone. I...WILL...TRY...
I thought what I'd do is when I get a working system tray bubble
going, I can either insert your latest DLL code and send you the
result, or send you my project and you can insert it yourself.
Whatever works best for us both.

Mr. G

John Doe

unread,
Dec 17, 2013, 12:19:30 AM12/17/13
to
Mr. G <gregorys12003 yahoo.com> wrote:

>>And then there is holding the control key to signify recording
>>mouse actions in the window instead of the screen...

> Hmm...remind me later on this.

That's a relatively simple change. If you like, I can do that first.

Mr. G

unread,
Dec 17, 2013, 1:01:41 AM12/17/13
to
Yes, okay. Forgive me if I don't always know what you mean. Tonight I
was looking at some of my code for my job and I didn't even know what
I was looking at!

It's funny how you can become intimately familiar with something, and
then if you don't keep looking at it, over time you can lose that
familiarity.

Mr. G

John Doe

unread,
Dec 17, 2013, 2:16:35 PM12/17/13
to
Mr. G <gregorys12003 yahoo.com> wrote:

> I thought what I'd do is when I get a working system tray bubble
> going, I can either insert your latest DLL code and send you the
> result...

That sounds like a good rule. Just use what you have and I will let
you know whenever I have an update posted on my Sky Drive. I plan to
have only one project file uploaded/listed, the most recent one.
After you include it, if and when you do, then you can upload the
result to your Sky Drive and let me know.

Thanks.

John Doe

unread,
Dec 17, 2013, 2:55:12 PM12/17/13
to
Correct me if I'm wrong, but...

Looks like DgnMacroRec can contain this duplicate code...

#pragma data_seg(".Shared")
int LastBrace=')';
#pragma data_seg()

Then I removed references to the new identifier "LastBrace" in the
CPP and H files, and it compiled successfully.

If that in fact does work, I would prefer keeping new
identifiers/variables in the one (DgnMacroRec) file. It's easier for
me, and maybe for you too because you will know what the new
identifiers are. Also, I won't get the identifiers mixed up in the
CPP and H files when I'm adding and removing temporary identifiers
for experimentation.

Mr. G

unread,
Dec 17, 2013, 8:54:52 PM12/17/13
to
Hmm...the reason I put the globals into a separate place was to make
things less cluttered, but whatever you want to do is fine with me.

Mr. G

Mr. G

unread,
Dec 17, 2013, 9:27:30 PM12/17/13
to
On Tue, 17 Dec 2013 19:55:12 +0000 (UTC), John Doe
<jd...@usenetlove.invalid> wrote:

Oh, and just to explain it a bit even if you decide to have some
globals in the main file...in C++ you're only supposed to "#include"
header files. So if you want the globals in a separate file, you
define them in another .cpp file. Then when you create your header
file to be included, you mention all the stuff you want included and
indicate it's defined elsewhere by using the "extern" keyword. I
suppose you could just put the definitions in the header file, but
that wouldn't be technically correct. Of course, global variables
aren't supposed to be used very often either, but in the case where
they're shared by other processes it's fine, although there is another
way to do it.

I've never been a fan of C++ because it just didn't seem to match the
way my brain works, so instead I opted to learn assembly language. But
since CPUs have changed so much over the past decade, I gave up on
that because I'm not a system programmer. Still, assembler can be fun
and you can just stick to 8086 style if you want. It's kind of
interesting to know how the machine works, and also there are times
where you can actually inline some assembler into your C++ code if you
know what you're doing.

I realize you're not probably going to dig that deep, but I'm just
rambling on just in case you find it interesting.

Mr. G

John Doe

unread,
Dec 17, 2013, 11:22:54 PM12/17/13
to
Mr. G <gregorys12003 yahoo.com> wrote:

> Oh, and just to explain it a bit even if you decide to have some
> globals in the main file...in C++ you're only supposed to
> "#include" header files. So if you want the globals in a
> separate file, you define them in another .cpp file. Then when
> you create your header file to be included, you mention all the
> stuff you want included and indicate it's defined elsewhere by
> using the "extern" keyword. I suppose you could just put the
> definitions in the header file, but that wouldn't be technically
> correct.

If there is nothing technically wrong with having global
identifiers (the identifiers used in my mouse and keyboard hooks)
in the main file, that works for me. I can double check that an
identifier is used simply by saying "down word" (double clicks on
the word under the pointer and searches down for it).

> Of course, global variables aren't supposed to be used very
> often either, but in the case where they're shared by other
> processes it's fine, although there is another way to do it.

FWIW... I agree with your opinion that the input processing code
in the DLL makes little or no difference when it's used only
during recording.

> I've never been a fan of C++ because it just didn't seem to
> match the way my brain works, so instead I opted to learn
> assembly language. But since CPUs have changed so much over the
> past decade, I gave up on that because I'm not a system
> programmer. Still, assembler can be fun and you can just stick
> to 8086 style if you want. It's kind of interesting to know how
> the machine works, and also there are times where you can
> actually inline some assembler into your C++ code if you know
> what you're doing.
>
> I realize you're not probably going to dig that deep, but I'm
> just rambling on just in case you find it interesting.

Knowing this is anything but a commercial project, I really
appreciate your help. Thanks. I read technical stuff all the time,
BTW. I don't have to understand it or apply it.

John Doe

unread,
Dec 18, 2013, 4:10:31 AM12/18/13
to
I had just switched to Unicode before checking out your project. I
think that version has to tiny improvements. One is that records a
mouse double-click correctly (except in Visual Studio). The other is
that it works with numlock off instead of on.

Better for it to allow recording with numlock off, right?

John Doe

unread,
Dec 18, 2013, 4:13:07 AM12/18/13
to
In case I wasn't clear...

Better for it to allow recording with numlock off so that the numeric
keypad can be used when the program is running, right?

Mr. G

unread,
Dec 18, 2013, 11:26:17 AM12/18/13
to
I agree 100%. I never use the keypad for navigating when I've got
arrow keys right next door. The keypad is generally useless to me
without numlock...until now! (Although I did make use of it in another
program I wrote for purposes of land descriptions where 1 is SW/4, 3
is SE/4, 7 is NW/4, and 9 is NE/4, etc.)

John Doe

unread,
Dec 18, 2013, 1:08:39 PM12/18/13
to
Mr. G <gregorys12003 yahoo.com> wrote:

> John Doe <jdoe usenetlove.invalid> wrote:
>
>>In case I wasn't clear...
>>
>>Better for it to allow recording with numlock off so that the
>>numeric keypad can be used when the program is running, right?
> I agree 100%. I never use the keypad for navigating when I've
> got arrow keys right next door. The keypad is generally useless
> to me without numlock...until now! (Although I did make use of
> it in another program I wrote for purposes of land descriptions
> where 1 is SW/4, 3 is SE/4, 7 is NW/4, and 9 is NE/4, etc.)

The DLL with that little correction is uploaded.
0 new messages