Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Macro recorder

  • This topic is locked This topic is locked
56 replies to this topic
  • Members
  • 25 posts
  • Last active: Jul 05 2010 05:29 PM
  • Joined: 04 Mar 2009
Yes, you can get it from the first post of this topic by Titan. It's one of his files.
Maybe I should directly integrate it inside the recorder file?

  • Members
  • 3 posts
  • Last active: Apr 18 2009 04:04 AM
  • Joined: 15 Apr 2009
I wanted to use this recorder to automate some actions in a game similair to WoW but the problem is it doesnt click the buttons inside the game even tho the game window is active; i've tryed writting scripts manually in autohotkey and autoitv3 and same results, i also tryed recording macros with various macro recorders and it still doesnt work.I tried with the window being already active as to window being activated by the script and it doesnt work. I am using windows XP. Anyone has any suggestions?

cerewa notloggedin
  • Guests
  • Last active:
  • Joined: --
Tzar - if you have not tried it already, try
sendmode play

  • Members
  • 3 posts
  • Last active: Apr 18 2009 04:04 AM
  • Joined: 15 Apr 2009
i did, i also did setwindelay, setkeydelay, setmousedelay and then i also tried SendPlay ... but it didnt work still. It works fine on the desktop, it moves the mouse, clicks on icons and stuff just it doesnt click the buttons in the game window (it does everything in the background desktop). My friend tho tried to use one of the macro recording things and it worked for him but he is using Windows Vista and i have Windows XP so if someone knows something would be appriciated if u posted becouse installing Windows Vista just for this sounds silly :p ty for the fast reply tho much apriciated.

  • Members
  • 3 posts
  • Last active: Apr 18 2009 04:04 AM
  • Joined: 15 Apr 2009
The game is using GameGuard i think thats the reason why its not working coz GameGuard is blocking keypresses simulated with keyboard API's? probably windows vista 64 uses some other lybrary to execute keypresses thats why maybe it works i am not sure. Anyone has any idea about that?

  • Guests
  • Last active:
  • Joined: --

I need feedback, does it work for other people too?

Metaxal, Your updates don't seem to help the mouse issue someone else mentioned above. However it's almost there...
I recorded a drawing in paint and then played it back and it only drew 2 straight lines. (starting and stopping points of each squiggly line i drew).

One question, what is the number for next to mouse movements?

Nice work from both of you(Titan and Metaxal).

Chicken Pie 4 Tea
  • Members
  • 379 posts
  • Last active: Dec 12 2014 06:46 PM
  • Joined: 18 Aug 2009
Metaxal, thanks for doing a bit more work on this as now your version works for me. Only tried it a few times mind you so cant promise i wont fine a problem.
I used to be forced to remove the last few lines of the code it produced to get it to work (in the previous verson not your version).
One thing that happened in your version was that I had firefox minimized when i recorded a test macro (which was opening a folder and starting up a small app.)
When i tried to play it back the minimized firefox was maximized which screwed things up! So obviously recording a macro whilst having a webbrowser minimised is not a good idea. I cant think why anyone would normally do this anyway so no worries.
"Choose your parents wisely"

Anton Bukov
  • Members
  • 3 posts
  • Last active: Feb 10 2010 02:17 PM
  • Joined: 28 Aug 2009
Hello, I think there should be added lbl4 and gui_moveinte controls to v array
v = sec1, ... ,gui_play,lbl4,gui_moveinte
and I translate labels to Russian
lang_table =
( Join`n `
Recorder by Titan,Titans Makro Recorder, Enregistreur de macro par Titan,Генератор макросов Titan-а
Recording options,Aufnahmeoptionen,Options d'enregistrement,Опции записи
&Time intervals,&Zeitintervalle,&Intervalles de temps,Временные интервалы
&Window actions,&Fensteraktionen,&Gestion des fenetres,Действия над окнами
&Use control commands,&Control-Befehle,&Commandes de controle,Действия над элементами управления
&Keyboard actions,&Tastaturaktionen,C&lavier,Нажатия клавиш
Mouse c&licks,&Mausklicks,Clics &souris,Клики мышкой
Hotkeys,Hotkeys,Hotkeys,Горячие клавиши
&Save As...,&Speichern unter...,&Enregistrer sous...,Сохранить как...
Save As...,Speichern unter...,Enregistrer sous...,Сохранить как...
AutoHotkey Scripts,AutoHotkey Scripts,AutoHotkey Scripts,AutoHotkey скрипты
Recording macro...`nPress $1 to stop.,Makroaufzeichnung...`nBeenden mit $1,Enregistrement en cours...`nAppuyez sur $1 pour arreter,Запись макроса... `nДля остановки нажмите $1
"Loading script, please wait...","Lade Skript, bitte warten...","Chargement du script, veuillez patienter...","Скрипт загружается..."
Save script,Skript speichern,Enregistrer le script,Сохранить скрипт
Would you like to save the current script before closing?,Vor Beenden speichern?,Enregistrer avant de quitter ?,Сохранить изменения?

If A_Language in 0407,0807,0c07,1007,1407
   lang = de
Else If A_Language in 040c,080c,0c0c,100c,140c,180c
   lang = fr
Else If A_Language in 0409
	lang = ru
Else lang = en ; default

  • Members
  • 25 posts
  • Last active: Jul 05 2010 05:29 PM
  • Joined: 04 Mar 2009
I updated the code, but I have no time for testing...

  • Members
  • 108 posts
  • Last active: Mar 16 2014 08:02 PM
  • Joined: 22 Jan 2009
Great stuff Metaxal!

Thanks for adding recording mouse clickNdrag events and Relative to window checkbox.

One additional function I would really love to see is a checkbox:
[X] Rel Mouse

This would produce code with relative coordinates to the initial mouse position, instead of absolute hardcoded numbers.

Take for instance a look at the following recording sessions:


Make a square selection of objects, using ClickNDrag

CoordMode, Mouse, Screen
SetMouseDelay, 2
MouseMove, 0, 0
Send, {VK01 down}
MouseMove, 1, 0
MouseMove, 2, 0
MouseMove, 3, 0
MouseMove, 4, 0
MouseMove, 5, 0
MouseMove, 6, 0
MouseMove, 7, 0
MouseMove, 8, 0
MouseMove, 9, 0
MouseMove, 10, 0
MouseMove, 11, 0
MouseMove, 12, 0
MouseMove, 13, 0
MouseMove, 14, 0
MouseMove, 15, 0
MouseMove, 16, 0
MouseMove, 17, 0
MouseMove, 18, 0
MouseMove, 19, 0
MouseMove, 20, 0
MouseMove, 20, 1
MouseMove, 20, 2
MouseMove, 20, 3
MouseMove, 20, 4
MouseMove, 20, 5
MouseMove, 20, 6
MouseMove, 20, 7
MouseMove, 20, 8
MouseMove, 20, 9
MouseMove, 20, 10
MouseMove, 20, 11
MouseMove, 20, 12
MouseMove, 20, 13
MouseMove, 20, 14
MouseMove, 20, 15
MouseMove, 20, 16
MouseMove, 20, 17
MouseMove, 20, 18
MouseMove, 20, 19
MouseMove, 20, 20

Usefull for selecting multiple documents, or icons for instance.

However, it will only playback from the absolute coordinates
starting at 0,0

Would be nice if it would play back from the current mouseposition, so
the recording with relative mousevoordinates could look like this:

CoordMode, Mouse, Screen
SetMouseDelay, 2
MouseGetPos, xpos, ypos
MouseMove xpos, ypos
Send, {VK01 down}
MouseMove, xpos+1, ypos
MouseMove, xpos+2, ypos
MouseMove, xpos+3, ypos
MouseMove, xpos+4, ypos
MouseMove, xpos+5, ypos
MouseMove, xpos+6, ypos
MouseMove, xpos+7, ypos
MouseMove, xpos+8, ypos
MouseMove, xpos+9, ypos
MouseMove, xpos+10, ypos
MouseMove, xpos+11, ypos
MouseMove, xpos+12, ypos
MouseMove, xpos+13, ypos
MouseMove, xpos+14, ypos
MouseMove, xpos+15, ypos
MouseMove, xpos+16, ypos
MouseMove, xpos+17, ypos
MouseMove, xpos+18, ypos
MouseMove, xpos+19, ypos
MouseMove, xpos+20, ypos
MouseMove, xpos+20, ypos+1
MouseMove, xpos+20, ypos+2
MouseMove, xpos+20, ypos+3
MouseMove, xpos+20, ypos+4
MouseMove, xpos+20, ypos+5
MouseMove, xpos+20, ypos+6
MouseMove, xpos+20, ypos+7
MouseMove, xpos+20, ypos+8
MouseMove, xpos+20, ypos+9
MouseMove, xpos+20, ypos+10
MouseMove, xpos+20, ypos+11
MouseMove, xpos+20, ypos+12
MouseMove, xpos+20, ypos+13
MouseMove, xpos+20, ypos+14
MouseMove, xpos+20, ypos+15
MouseMove, xpos+20, ypos+16
MouseMove, xpos+20, ypos+17
MouseMove, xpos+20, ypos+18
MouseMove, xpos+20, ypos+19
MouseMove, xpos+20, ypos+20

This would greatly help in macro recording for instance for games
or drawing programs, where you repeatedly want to perform a
complex mouse action, but on different locations on the screen.


  • Members
  • 25 posts
  • Last active: Jul 05 2010 05:29 PM
  • Joined: 04 Mar 2009
I made some changes in the code.
Now, if the "Rel" checkbox is checked, the mouse coordinates are relative to their original (screen) position.

I did some tests in Paint, it seems to work.

I also added a new "Window Rel" checkbox, but it doesn't work yet (don't when I'll fix this though...). It wasn't functional before anyway.

Direct link to the latest version:
<!-- m -->http://www.autohotke... ... 470#254470<!-- m -->

  • Members
  • 108 posts
  • Last active: Mar 16 2014 08:02 PM
  • Joined: 22 Jan 2009

It works fine in paint, however slow, since the mousespeed is not set,
would be nice if one can choose a mousespeed prior to recording and will
be recorded to the mousemove, x, y, speed, R lines

I know the AHK helpfile says that mousespeed 0 (fastest) will sometimes
oversaturate games etc, if lots of mouseactions are involved,
but since you record the clickndrag events at intervals, discrete mousemoves of only a few pixels at the time, instead of drawing long lines, this shouldn't be much of a problem for most apps

I have edited my recorded script to set mousespeed to 0 and it draws 4 times faster in paint.