Mouse And Keyboard Macro Recorder

Post your working scripts, libraries and tools for AHK v1.1 and older
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder v3.5

Post by feiyue » 07 Aug 2017, 22:09

SpeedMaster wrote: The unofficial version is only experimental but I hope that the find text tool will be also incorporated in the official version. :thumbup:
I know, for advanced users, image search is a very important function,
but the number of FindText() code is larger, if integrated in this script is too big,
so in the update to v3.5, I have added a simplified version of the FindText(),
because it is simplified, the ImageSearch() function does not support fault-tolerant.
I think it is enough if you use it on only one computer. :xmas:
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder v3.6

Post by feiyue » 15 Aug 2017, 08:32

I updated the script to v4.0, Added some features:
Wait for the window, wait for the mouse cursor type, wait for the A_CaretX/Y,
wait for the color, wait for the image, wait for change, etc.
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder v4.0

Post by feiyue » 16 Aug 2017, 14:38

In the beginning, I posted it as a simple tool for novices,
Because the function is too simple, I do not use it myself.

When I'm trying to use it to do a full automatic web page operation,
I found out that more features needed to be added.
So I made extensive improvements for writing complex automated scripts. :superhappy:

However, because my English is not good enough, very little introduction,
So if you want to use it, you need to understand the code first. :xmas:
RoyBlumenthal

Re: Mouse And Keyboard Macro Recorder v4.2

Post by RoyBlumenthal » 23 Aug 2017, 09:12

Thank you so much, Sancarn! Much appreciated!
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Mouse And Keyboard Macro Recorder v4.5

Post by SpeedMaster » 27 Aug 2017, 17:51

Good job :thumbup:
Last edited by SpeedMaster on 09 Nov 2021, 05:56, edited 1 time in total.
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder v4.5

Post by feiyue » 27 Aug 2017, 22:50

SpeedMaster wrote: but I have a hard time understanding how to use Wait image function. Does it works like findtext() ?
findtext() function has a capture interface and i don't see any capture interface.... :think:
@SpeedMaster, Please refer to the following usage:

1. In the process of recording, if you want to insert the Wait image code,
You can move the mouse to the target position,
Then hold down the Ctrl key (Don't release),
Then move the mouse to another location,
Then release the Ctrl key.
(At this point, the color and image of the target position
are captured first, and then the Ctrl menu is displayed)
You can move the mouse to the “Add Wait Pic” Button,
Then press the Ctrl key (and release),
OK, you have inserted the Wait image code.

2. When the Gui window has been displayed,
If you click the line in the edit box, containing the Wait image code,
The small edit box above shows the current image to search for,
There are buttons on the left of the small edit box to cut the edges of the image,
To make the image more consistent with the search requirements.
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Mouse And Keyboard Macro Recorder v4.5

Post by SpeedMaster » 28 Aug 2017, 08:30

Thanks :!:
Last edited by SpeedMaster on 09 Nov 2021, 05:57, edited 1 time in total.
CAH9t
Posts: 29
Joined: 15 Jul 2017, 11:12
Location: Land

Re: Mouse And Keyboard Macro Recorder v4.5

Post by CAH9t » 10 Sep 2017, 11:13

Hi, feiyue . Long time no see.
Could you get back to 4.1 version with automatic conversion after setting image origin and hopefully with window relative checkbox, please. First of all, I don't absolutely see any usefulness in screen relative coordinates so it's very counter productive to convert them each time from my point of view. Secondly, manual Conversion may be a bit glitchy (buggy): for example try to convert coordinates with image origin then with window origin then again with image origin - in my case click coordinates with image origin got messed up calculations.

Let me be honest with you, I don't like screen coordinates and manual conversion by default at all. I appreciate the effort and I know you mean well (I suppose you're a big screen-relative fan :D ). But could you get back to the checkbox view ( gui with checkboxes) so we would have a choice :).
1st checkbox. Automatic window relative coordinates.
2nd checkbox. Automatic conversion when image origin (or maybe other origin) is set. And some tool to cancel the current automatic image origin, please.
It was that way in version 4.1 and I thought it was optimal.
3rd. Almost forgot. Could you add in your useful ctrl-menu imageSearch+Click ( or maybe you will call it quick imageSearch+Click, no matter) ? I've tested your recorder and it was frequently needed option (but I had to use the combo of image origin + click + switching back to window relative)

Take no offense, It's just for the best of "Mouse And Keyboard Macro Recorder". Best regards.
Xihui

Re: Mouse And Keyboard Macro Recorder

Post by Xihui » 26 Mar 2018, 11:45

Good recorder. A suggestion for your instruction, because one reader could not find the GUI window.

2. To start this Recorder, double-click its icon and move the mouse to the left edge of the screen to show or hide the GUI window.
Bitmann
Posts: 1
Joined: 18 Mar 2018, 06:18

Re: Mouse And Keyboard Macro Recorder

Post by Bitmann » 27 Mar 2018, 10:30

Thanks for your brilliant work on the Macro Recorder. I was looking for something like this, came across yours, and in a few minutes was able to automate something that would have taken a few hours of tedious effort. Best part is that it was easy to figure out without reading any tutorials -- just a little trial and error

[Mod edit: Removed dubious signature link.]
Guest

Re: Mouse And Keyboard Macro Recorder

Post by Guest » 27 Apr 2018, 15:04

How does this work? I can't able to make it to work.
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder

Post by feiyue » 26 May 2018, 10:09

I've updated it to v4.0 to write more complex scripts, but it's more complex for use, and some private preferences are not suitable for everyone.
So I restored the previous version, only to achieve simple functions, to facilitate the use of novice.
guest3456
Posts: 3477
Joined: 09 Oct 2013, 10:31

Re: Mouse And Keyboard Macro Recorder

Post by guest3456 » 26 May 2018, 10:52

feiyue wrote:I've updated it to v4.0 to write more complex scripts, but it's more complex for use, and some private preferences are not suitable for everyone.
So I restored the previous version, only to achieve simple functions, to facilitate the use of novice.
maybe you can post both versions so users can choose if they want to use the more advanced one?

brutus_skywalker
Posts: 175
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: Mouse And Keyboard Macro Recorder

Post by brutus_skywalker » 27 May 2018, 04:33

guest3456 wrote:
feiyue wrote:I've updated it to v4.0 to write more complex scripts, but it's more complex for use, and some private preferences are not suitable for everyone.
So I restored the previous version, only to achieve simple functions, to facilitate the use of novice.
maybe you can post both versions so users can choose if they want to use the more advanced one?
yup, i think a lot of people would appreciate the choice, or at the very least a dropbox link or something so we could check it out, your tools are just freakin rad dude.
Outsourcing Clicks & Presses Since 2004.
dcard
Posts: 1
Joined: 27 May 2018, 11:41

Re: Mouse And Keyboard Macro Recorder

Post by dcard » 27 May 2018, 12:16

Wow. Fantastic Script!

I feel pretty stupid, because I am struggling with some really basic things here. Not super familiar with the hotkey stuff in this environment.

I discovered that my keyboard PAUSE / BREAK key does not send any commands unless the "Crtrl" key is held down, resulting in a "CrlBreak" command.

It doesn't appear that the script uses any other hotkey than the "Pause" key, which doesn't work for me.

So, I have been playing without an available hotkey to pause and properly stop the script.

What I find is that when I move cursor to left screen, grab menu gui, "STOP," and subsequently play back the macro, there is no "end" on that macro and it keeps playing doing nothing. I must hit the "STOP" before hitting "PLAY" again. I have checked the "LOOP" option, and it doesn't work, as I suspect that there is no "STOP" invoked at the end of the Macro. This may be as a result of the non-PAUSE method I must use to stop a recording macro.

So first issue is how to change the PAUSE hotkey in your LINE 90:

;----------------------------
Hotkey, *Pause, Pause
; RAlt & 6::GoSub Pause
; RAlt & 6::Pause
;----------------------------

I use the Right ALT key heavily in my system, and tried a couple of things here, as you see in above commented out lines. No success.

I may be getting confused with the fact that the "Pause" word is three things in AHK and your script. "Pause" is a defined keyboard press, "Pause" is a defined hard function, and you use "Pause" as a label in your script. Help!

Once I get through replacement of that hotkey for "Pause," I would really like a separate hotkey to start recording, stop recording as a toggle, and a different hotkey to begin playback, and stop playback as a toggle. Again, I like to stick with my RAlt combo.

Lastly, I see in your comments at begin of script that you can hit the "Ctrl" key to display and move through the menu items. That does not work in my Win 10 system. Not sure it is necessary though.

Also in comments, it says that the "STOP" saves to a logfile. As I run autohotkey in portable mode, that puts a temporary ~Record.txt in the same directory as your script. Is that behaving properly? There is no ability to store and retrieve multiple recordings? Can I use simple renaming of that ~Record.txt file as a stopgap?

Thx in advance for any pointers for a newb here! Again, a great script!!!
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder

Post by feiyue » 01 Jun 2018, 07:13

Update to v4.5 version, Add some functions. :superhappy:
1. Add the waiting picture function --> Using the FindText() function.
2. Add debug function. When the script is stuck, you can locate the current running line.
3. Add continue running by the current row from the edit box's cursor.

Due to the automatic operation of web pages, the relative windows are not very common.
So I added the original point of the picture, which can transform the other coordinates
into the coordinates of the relative pictures.

In addition, the time between recording operations is no longer recorded, which speeds up playback.
However, too fast speed may cause operational failure,
so it may be necessary to manually increase the delay in the right place.
Although it's a little trouble for beginners, it's worth it. :beer:
Last edited by feiyue on 02 Jun 2018, 11:35, edited 1 time in total.
brutus_skywalker
Posts: 175
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: Mouse And Keyboard Macro Recorder

Post by brutus_skywalker » 02 Jun 2018, 09:26

Pretty sweet, but i think you should add a tick-box option to use Image under cursor as a reference point(Click-At-Image) just as Win Title and Win Text are used. Also a MoveToPic Ctrl menu option would be nice addition as well.
feiyue wrote: In addition, the time between recording operations is no longer recorded, which speeds up playback.
....Although it's a little trouble for beginners, it's worth it.
Agreed,but isn't it better to just make it a tickbox option(default unticked),i.e RealTimeRecording on/off. I'm just saying...

As always,U Sir ARE, RAD!!!
Outsourcing Clicks & Presses Since 2004.
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder

Post by feiyue » 02 Jun 2018, 11:19

brutus_skywalker wrote:Also a MoveToPic Ctrl menu option would be nice addition as well.
This is a good suggestion. I add a ClickPic option to the Ctrl menu. :bravo:
This can reduce the trouble of setting the original image and changing the click coordinates to the relative origin.

Of course, if there are many coordinates based on the origin of the picture,
we should set the origin of the picture and manually convert it.

If the other coordinates are automatically converted on the basis of the picture origin,
it is easy to be confused when the window is changed,
so it is better to use all the window coordinates,
and finally to batch selection and conversion, I think it's a bit more reliable. :beer:

In addition, because each function has its own delay, if the time delay is recorded again,
The playback is more time-consuming than the actual operation.
In fact, even if the delay is no longer recorded, it can be reliably playback.
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder

Post by feiyue » 03 Jun 2018, 17:04

I have provided a useful function: WaitChange(x, y, w:=150, h:=1, timeout:=3).
It can greatly improve the reliability of automated scripts. :dance:

My idea is to get a screenshot before any mouse clicks,
After clicking, you can wait until a certain position of the screen changes.
(just press the Ctrl key on the screen where it has changed to add the function) :beer:
Last edited by feiyue on 19 Jun 2018, 23:51, edited 1 time in total.
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

Re: Mouse And Keyboard Macro Recorder

Post by feiyue » 19 Jun 2018, 23:49

Update to v4.6 version, Cancel the relative window selection box,
all use relative screen coordinates, it looks troublesome, actually use is very simple. :dance:
CAH9t wrote:Let me be honest with you, I don't like screen coordinates and manual conversion by default at all.
Sorry, I still prefer to use absolute coordinates.
I used the relative coordinates for a while, but I changed it again because I was not used to it. :beer:
Post Reply

Return to “Scripts and Functions (v1)”