# How to make a macro/auto typer?



## gamermatt

Hello, I'm not 100% sure if this is the right place for the question, so feel free to move it.

I work on excel everyday working on a database for a website which sells car parts. I have to organize data into a certain format in excel. There are some things that i do that are the exact same thing, over and over. I was wondering if I would be able to run a macro/bot of some sort that can do this for me, faster. 

For example, i want a bot to press:
cntrl+c (copy)
alt+tab (change windows)
ctrl+f (find)
cntrl+v (paste)
enter (find the text)
click (on the close button on find window)
cnrl+c (copy found text)
alt tab (change windows)
cntrl+v (paste over text)
alt tab (change windows)
click (on the change color button in excel)
alt tab (change back)
arrow down (go to next entry)

then repeat again, over and over.

If anyone could help me it would be greatly appreciated. Im pretty sure this is possible, but i have no experience in programming and such.

If you can't help, any other forum recommendations where i can ask this question would be helpful

Thanks.

-Matt


----------



## jamiemac2005

Hey, i have a suggestion for you but it may not be amazing(if you don't have the time to read the getting started for the language)...

I use an interpreted language program thing called AutoHotkey which can do what you want it to do(Possibly more intelligently[e.g. instead of just "alt+tab"ing it can open the window with a certain title(excel)] and instead of just "Ctrl+c"/"Ctrl+v"ing it can access the clipboard directly)...

It's simple to learn if you understand any other programming language (even if not it just takes a little more time)...

Anyway the link is here (there is also a macro recorder for this language):

http://www.autohotkey.com/

Read the quickstart (and try using/looking for the macro recorder[in the program folder you install it to])

If you don't want to use that there is a simpler macro record/play utility i used to use called MacroXP but AutoHotkey is generally more intelligent(as described above)...

If you need any more help then post back

Cheers,
Jamey


----------



## gamermatt

Thanks a lot, that is exactly what i was looking for. I'll look into it. 

thanks!


----------



## gamermatt

ok so i believe i made a script for what i need, but i wanted to know a way to activate the script while already in excel. is there a hotkey of some sort to start the script? 

If you could skim this over and tell me if it looks right:

Loop 100
{
Send ^c!{tab}^f^v{enter}{Esc}{Right}{Right}^c!{tab}^v!{tab}
Click 1239, 67
!{tab}{Down}
}


----------



## gamermatt

Never mind, i just added this to the beginning of the script to ask me if i want to continue. when the message comes up, i can then select my window. 

MsgBox, 4, , Would you like to continue?
IfMsgBox, No
return
; Otherwise, the user picked yes.
MsgBox You pressed YES.


----------



## gamermatt

Here is the completed script, but it does'nt seem to be doing what i want it to do... i guess ill have to mess around with it more

MsgBox, 4, , Would you like to continue?
IfMsgBox, No
return
; Otherwise, the user picked yes.
MsgBox You pressed YES.

Loop 100
{
Send ^c!{tab}^f^v{enter}{Esc}{Right 2}^c!{tab}^v!{tab}{Click 1239, 67}!{tab}{Down}
}


----------

