[TRANSCRIPTION]
Hi, I’m Nathan Maus and in this video I’ll guide you through making your first macro with Elephant Automation.
This is Elephant Automation. In the Left Panel, we have all the tools we need to create our macro. A tool is a bunch of computer programming stuff all compressed into one little easy to use chunk. A tool usually has some inputs or parameters which you can use to change what exactly the tool does. A tool also has outputs which you can map to other tools inputs.
In the Center Panel, is where we build and edit our Macro. A Macro is simply a bunch of tools with specific inputs and outputs executed in a particular order. Usually we call them tools when we refer to them genericly and steps when we talk about them specifically.
In the Right Panel, is where we adjust the inputs and outputs of a particular step.
Alright, lets get started making our very first macro.
First, let’s drag the Execute Command tool into the macro. This tool let’s us execute a command as if it were in the windows command line. We’ll enter Notepad into the command input. When we execute this step, it will open up an instance of Notepad. We will make sure the Define Window option is checked and give this instance of Notepad the name Notes. By naming our windows, we can later use other steps to work on them by name.
Now let’s add the Set Window Parameters tool to our macro. This tool lets us change the size and location of our window. Let’s give our Notepad a height and width of 300 and an X and Y location of 100.
Now let’s run our Macro. First we use the mouse to highlight the top step. The macro will start executing from whatever step is highlighted but most often you’ll want to execute from the beginning. Then we’ll want to click on the Play Macro button. As you can see Elephant Automation opens up an instance of Notepad, sets it to the correct size and moves it to the correct location.
Next we’ll want to add the Mouse Input and Keyboard Input tools to our macro. This will let us click on the text editing portion of Notepad and then we will be able to type into it. Let’s set our coordinate system to Notes. This ensures that the mouse will be clicked with respect to the specific notepad we previously called Notes. We’ll set both the X and Y Location to 100. We’ll leave the button and action at their default settings to perform a left click.
In the Keyboard tool, we enter whatever it is that we want to be automatically typed into Notepad. Ok now lets run our Macro again and ensure that it works like we expected. Perfect.
Now lets create 3 more Notepads and arrange them in a nice grid so that each Notepad takes up a quarter of the screen. Ok now we have 4 Notepads, but lets be sure to give them different names. Now we add 3 more Set Window Parameter steps and we set each of them to work on a different window.
To get them to each take up a quarter of the screen, we have to know the screen resolution of the monitor, so let’s add a Get Screen Resolution step to our Macro. The Get Screen Resolution tool does exactly what it seems, in that it gets the screen resolution and returns the Width and Height of the screen so that we can use it as a base for when we change the size and location of our windows.
To map the output of the Get Screen Resolution tool to the inputs on our Set Window Parameter tools, we simply put the step number and the output name inside a pair of percentage signs like this. Now let’s do the same for the height. And we can’t forget that we want half the screen width and half the screen height.
Now let’s copy these for the rest of the steps.
Similarly, we can do the same to set the inputs for the locations of the Notepads. This will give us four notepads in the grid like pattern we desire. This is useful if you want to set up different programs in a specific manner to make them easy to work with.
Now let’s copy and paste the Mouse and Keyboard steps. One for each Notepad. We also have to change the coordinate system in each mouse step to refer to a different Notepad.
Works perfectly. Now lets use the Group tool to clean up our Macro and make it easier to read. We just move all the steps we want into the group and then we can rename the group something a little more descriptive for our particular application.
Now let’s automatically close all the windows. This will show us how to navigate through the programs menus using the keyboard. We use the Alt button to get to the menu bar, The F button for the file menu, the X button for the Exit option, and the N button so we Don’t save the file. So ALT F X N
So we add a mouse input and a keyboard input just like we did before.
And we enter ALT F X N, where the exclamation point stands in for the ALT button.
Now let’s copy and paste them 3 more times and add them to their own group for legibility. Let’s make sure we’re pointing to the right Notepads.
Alright, lets run the macro and see how we did.
Works Perfectly.
Thanks for watching this video, Get started making your first Macro as soon as possible, and if you have any more questions, check the elephantautomation.com website or our youtube channel for more help. Also if you found this useful or have any comments feel free to comment on, like, and share this video. See you next time.