[Gambas-user] Keystroke recorder for the IDE :)

Bruce Steers bsteers4 at gmail.com
Sat May 6 17:17:29 CEST 2023


On Sat, 6 May 2023 at 11:47, Benoit Minisini <
benoit.minisini at gambas-basic.org> wrote:

> Le 03/05/2023 à 13:31, Bruce Steers a écrit :
> >
> > Is this not anything of interest to you Ben?
> >
>
> Personnally I have never used a macro recorder. Do you have some example
> of what you used it for?
>

It can be very useful for various things, if you have any repetitive
keyboard task to do.

An example here where i use it to quickly set some Key variables from their
Property definitions.
Normally each line would have to be manually written. with the recorder I
can copy-n-paste the property definitions, start the recorder, then edit
one line and position to the next. then play the macro for all the other
lines.
https://youtu.be/LC-8qEMFGsA

I also gave a little explanation of it's usefulness and posted an example
video on the gambas.one forum where i quickly change a long list of
Key.Code values into a Collection.

I think both clips show how a feature like this has some potential to be
very handy.

Other uses could be in converting snippets of code from another languages
into gambas.



> Anyway, I think that being able to forge key or mouse events would be
> helpful for such a feature.
>

Yes very much so. then all the TextEditor KeyPress events would not need to
be copied and converted (and thought about if changes are made)


>
> I will think about that.
>

Many thanks kind sir :)


I have a couple of other issues at present.
I have gb.form.editor imported to my text editor program (the 1st clip
above) and i also have incorporated it into the IDE but it's not so good.
They both use Observer.class to observe the texteditor control.

In both uses the F3 keypress cannot be detected, i think the menu shortcut
is swallowing it up.  F3 is super useful with macros as you may often make
the last keystroke to be a search for the next occurrence of your edit.

It seems just with the IDE Ctrl-C, V, X presses are also not detected, but
they are in my program.
I assume again a menu shortcut is hiding the event somehow so
TextEditor_KeyPress() does not get it.

I need to workaround detecting the missing keypress events somehow. (if at
all possible)

Much respect
BruceS


> Regards,
> --
> Benoît Minisini.
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230506/6cc23eaf/attachment.htm>


More information about the User mailing list