AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Macro recorder
Goto page Previous  1, 2, 3, 4
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Metaxal



Joined: 04 Mar 2009
Posts: 21

PostPosted: Wed Apr 01, 2009 9:43 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Tzar



Joined: 15 Apr 2009
Posts: 3

PostPosted: Wed Apr 15, 2009 2:59 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
cerewa notloggedin
Guest





PostPosted: Wed Apr 15, 2009 6:14 pm    Post subject: Reply with quote

Tzar - if you have not tried it already, try
Code:
sendmode play

http://www.autohotkey.com/docs/commands/SendMode.htm
Back to top
Tzar



Joined: 15 Apr 2009
Posts: 3

PostPosted: Wed Apr 15, 2009 8:50 pm    Post subject: Reply with quote

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 Razz ty for the fast reply tho much apriciated.
Back to top
View user's profile Send private message
Tzar



Joined: 15 Apr 2009
Posts: 3

PostPosted: Fri Apr 17, 2009 2:19 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Yubin
Guest





PostPosted: Tue Jun 09, 2009 10:39 pm    Post subject: Reply with quote

Metaxal wrote:
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).
Back to top
mouse



Joined: 18 Aug 2009
Posts: 28
Location: holland

PostPosted: Wed Aug 19, 2009 4:51 pm    Post subject: Reply with quote

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.
_________________
I once had a spider called Clive, Dont know where he went.
Back to top
View user's profile Send private message
Anton Bukov



Joined: 28 Aug 2009
Posts: 3

PostPosted: Tue Sep 01, 2009 12:28 pm    Post subject: Reply with quote

Hello, I think there should be added lbl4 and gui_moveinte controls to v array
Code:
v = sec1, ... ,gui_play,lbl4,gui_moveinte

and I translate labels to Russian
Code:
lang_table =
( Join`n `
en,de,fr,ru
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,Клики мышкой
&Movements,&Bewegungen,&Mouvements,Движения
Rel,Rel,Rel,РВ
Hotkeys,Hotkeys,Hotkeys,Горячие клавиши
S&tart,St&art,&Debut,Старт
St&op,St&op,&Fin,Стоп
&Save As...,&Speichern unter...,&Enregistrer sous...,Сохранить как...
&Clear,Z&urucksetzen,&Effacer,Очистить
Macro,Makro,Macro,Макрос
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 ?,Сохранить изменения?
Replay,Abspiel,Rejouer,Выполнить
)

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


Last edited by Anton Bukov on Tue Sep 01, 2009 4:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
Metaxal



Joined: 04 Mar 2009
Posts: 21

PostPosted: Tue Sep 01, 2009 3:33 pm    Post subject: Reply with quote

Thanks.
I updated the code, but I have no time for testing...
Back to top
View user's profile Send private message
Scratch



Joined: 22 Jan 2009
Posts: 72

PostPosted: Sat Sep 05, 2009 5:27 pm    Post subject: Request: Mouse Recording Relative to Current Mouse Position Reply with quote

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:


STANDARD RECORDING WITH ABSOLUTE MOUSECOORDINATES,

Make a square selection of objects, using ClickNDrag

Code:

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
^F11::ExitApp


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:

Code:

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
^F11::ExitApp


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.

[/code]
Back to top
View user's profile Send private message
Metaxal



Joined: 04 Mar 2009
Posts: 21

PostPosted: Sun Sep 06, 2009 11:12 am    Post subject: Reply with quote

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:
http://www.autohotkey.com/forum/viewtopic.php?p=254470#254470
Back to top
View user's profile Send private message
Scratch



Joined: 22 Jan 2009
Posts: 72

PostPosted: Sun Sep 06, 2009 7:31 pm    Post subject: Reply with quote

Great!

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group