# Easy to use macro compiler



## Der Rabe (Jun 27, 2002)

I am looking for a macro write/compiler that is extremely easy to use. I have no programing language experience but have used a few keyboard/mouse recorder programs to create macros. Some one suggested AutoIt to me but I have no programming skills so anyone got a better suggestion for me.


----------



## Volt-Schwibe (Jan 12, 2003)

if you literally just want to script keystrokes and mouse movements, auto-it is going to be the simplest way to do this.

i might add, version 2 is the one you probably want, as v3 requires alot more experience to use and uses alot of c+ commands. (which i have no idea how to use.)

version two, uses simple commands like;

```
Repeat, 100
Sleep, 500
Send, {H}
Send, {e}
Send, {l}
Send, {l}
Send, {o}
Sleep, 500
LeftClick, 120,170
Sleep, 5000
LeftClick, 110,540
EndRepeat
Exit
```
if you need help with this, MANY of us here understand how to use it, so you could just ask for help where you need it.

the other alternative i can think of, is to pay for macro express, as it is definately the _easiest_ one to use, and works as well as auto-it. but seeing how a day or two will get you used to auto-it, and macro express costs 40$, it's a trade off.


----------



## Der Rabe (Jun 27, 2002)

Ok thanks for the advise....

For auto it script how do I know what the mouse coord I want it to click on are?


----------



## Der Rabe (Jun 27, 2002)

Ok since i never did this before this is what my non working test script looks like

This is what I want it to do. 

First off would like to be able to manually put in the number of times to run the script. (a pop up box to enter number of times to run)

Then is will run the script X amount of times depending on what was entered

Next I want it to press the f2 button once, delay for 6200ms, f1 once, delay 500ms, f4 once, delay 500ms, f3 once, delay 500ms, then repeat until x is reached


```
Send, {F2}
Sleep, 6200
Send, {F1}
Sleep, 500
Send, {F4}
Sleep, 500
Send, {F3}
Sleep, 500
Exit
```


----------



## Volt-Schwibe (Jan 12, 2003)

that's a slightly more complicated string...

let me look real fast at the readme.

that was easier than i thought.


```
InputBox, Loops, Question, How many cycles?
Sleep, 1000
Repeat, %Loops%
Send, {F2}
Sleep, 6200
Send, {F1}
Sleep, 500
Send, {F4}
Sleep, 500
Send, {F3}
Sleep, 500
EndRepeat
Exit
```
as far as how to locate the mousemove values, there is "reveal mode" in the auto it program folder, that will tell you the x,y for where you are pointing, along with the rest of the details they thought you'd need.


----------



## Der Rabe (Jun 27, 2002)

New question Say I want to use 1 script to run 4 mini scripts and depending on the input from the first question is which script is run for example: 

Which script do you wanna run 1-4? (input number here)

if #=1 then run this

if #=2 then run this

if #=3 then run this

if #=4 then run this


----------



## Volt-Schwibe (Jan 12, 2003)

ok, i have used enough of it to do that, give me a moment, and i will be back with it.

(helpin people is fun, cos you learn stuff!)

ok, here is what i think you wanted.....

if you want it to be a menu script, with seperate files as the actual scripts, we can do that too, but here in this, i have contained 4 different subroutines.


```
Start:
InputBox, Script, Question, Run which script? (1-4 or 0 to exit)
IfEqual, Script, 0, Exit
IfEqual, Script, 1, Goto, One
IfEqual, Script, 2, Goto, Two
IfEqual, Script, 3, Goto, Three
IfEqual, Script, 4, Goto, Four
Goto, Start

One:
InputBox, Loops, Question, How many cycles?
Sleep, 1000
Repeat, %Loops%
;=================SCRIPT "One" STARTS HERE==================
Send, {F2}
Sleep, 6200
Send, {F1}
Sleep, 500
Send, {F4}
Sleep, 500
Send, {F3}
Sleep, 500
;=================SCRIPT "One" ENDS HERE====================
EndRepeat
Goto, Start


Two:
InputBox, Loops, Question, How many cycles?
Sleep, 1000
Repeat, %Loops%
;=================SCRIPT "Two" STARTS HERE==================
Send, {F2}
Sleep, 6200
Send, {F1}
Sleep, 500
Send, {F4}
Sleep, 500
Send, {F3}
Sleep, 500
;=================SCRIPT "Two" ENDS HERE====================
EndRepeat
Goto, Start


Three:
InputBox, Loops, Question, How many cycles?
Sleep, 1000
Repeat, %Loops%
;=================SCRIPT "Three" STARTS HERE================
Send, {F2}
Sleep, 6200
Send, {F1}
Sleep, 500
Send, {F4}
Sleep, 500
Send, {F3}
Sleep, 500
;=================SCRIPT "Three" ENDS HERE==================
EndRepeat
Goto, Start


Four:
InputBox, Loops, Question, How many cycles?
Sleep, 1000
Repeat, %Loops%
;=================SCRIPT "Four" STARTS HERE=================
Send, {F2}
Sleep, 6200
Send, {F1}
Sleep, 500
Send, {F4}
Sleep, 500
Send, {F3}
Sleep, 500
;=================SCRIPT "Four" ENDS HERE===================
EndRepeat
Goto, Start
```


----------



## Der Rabe (Jun 27, 2002)

First off I want to say thank you very much

Next how do I make the coords realtive to the active window verse the whole desktop incase the windows is posisitioned sligthtly different.


----------



## Der Rabe (Jun 27, 2002)

Also is there a certain Key combo you can press to pause or terminate macro before it is finished or if not automatic how do I add one.


----------



## Der Rabe (Jun 27, 2002)

Der Rabe said:


> First off I want to say thank you very much
> 
> Next how do I make the coords realtive to the active window verse the whole desktop incase the windows is posisitioned sligthtly different.



Disregard this question I figured out that it is automatically to active window


----------



## Volt-Schwibe (Jan 12, 2003)

Der Rabe said:


> Also is there a certain Key combo you can press to pause or terminate macro before it is finished or if not automatic how do I add one.


this is something i have been trying desperately to figure out.

it's seriously annoying when i accidentally start it, and it runs hog wild, and i can't stop it.

if i come up with code to stop this, i will spit it out here for you.


Der Rabe said:


> Disregard this question I figured out that it is automatically to active window


there is a specific command to make it globally work across all windows, but yes, by default, it is set to use the active window.


----------



## Der Rabe (Jun 27, 2002)

Volt-Schwibe said:


> there is a specific command to make it globally work across all windows, but yes, by default, it is set to use the active window.


Can you share just incase I want to get even more creative

Two more questions

1. Is it possible to make a macro run on a window in the background (aka minimize)

2. And How do I set a trigger key so say I want the macro to be running in the background but only execute the script when a certian combo is pushed like ctrl+1 or ctrl+shift+a. So I can just press that combo every time i want it to run very having to luanch the exe every time?


----------



## Volt-Schwibe (Jan 12, 2003)

Der Rabe said:


> Can you share just incase I want to get even more creative
> 
> Two more questions
> 
> ...


i think these are two questions that pass my expertise level.

but i will try to find out.


----------

