Friday, April 15, 2016

Bot Basics - Lets get started with iMacros!

You may ask, What makes this guy Botman? I've been creating and implementing workflow and automated task completion for many years. I will go over the tools I've learned and how you can implement them in real world applications. I've also been creating these for business and personal use.

Let's get started.  I've found the easiest method to start your botting learning is iMacros. IMacros is a great container to create versitile and meaningful automation with simple features.

This Video goes over the instructions below:


These steps will introduce simple features of the program plus a very simple script to get started. 

Step 1. Download a trial of iMacros.  You can try it for free for 30 days. With in your first few days you will find the power of iMacros astonishing.

http://imacros.net/download

There are two versions of iMacros. The iMacros for development and the macro player. The development tool is a fully functional player. The player can only play recorded macros. The only thing that separates them is the license key.  

Step 2.  Explore! When I was first introduced to iMacros I hit up their wiki.  There is a lot of good information but not everything fits into every need. Open up iMacros and start to explore the basic functions. 

Step 3. Click on some of the demos on the left. Watch them run (Just Double Click). You can see the syntax of the iMacros scripts plus see how they are manipulating the websites. 


Step 4. Record something simple! Hit the record button on the left. 

In the address bar at the top, type in google.com 
Type in I'mBotman Blogger then hit Search
Hopefully this page will show up in the search results. Then click on any link. 
After you have loaded the next page click Stop on the left. 
This will save as the iMacros file #Current.iim
You can rename this later after you've created something meaningful. 

Let's review the code!





This code specifies the version of iMacros used to record the macro.

VERSION BUILD=11.1.495.5175

This code specifies go to tab 1

TAB T=1

This code specifies to close all other open tabs. This is important if you are testing or running macros on the same session without closing. This resets the positions so all prior recorded functions match to the proper tab. 

TAB CLOSEALLOTHERS

This code specifies a specific number of seconds wait between each playback command. 

SET !PLAYBACKDELAY 0.2

This code specifies a web address to navigate to. 

URL GOTO=https://www.google.com/?gws_rd=ssl

This code specifies a manual comment in code. You can see in my recording that u manually type it in. It has no real impact on the macro, but can be critical to your trouble shooting later. In the video our code ran too fast so I commented a reason why I put in the delays. 

'We could really benefit from some delays to see actually how the automation works

This code specifies a form input field has been selected ATTR=NAME:q indicates the q field has been selected.  CONTENT= specifies the content going into the field. You will notice that spaces are replaced with <SP>. Spaces will return a programming error when manually input. 

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:q CONTENT=I'm<SP>Botman<SP>Really<SP>Blog

This code specifies a delay. I macros will wait until all HTML functions have been loaded to move to the next line of code. These delays allow for events like JavaScript to execute after the page is fully rendered. 

WAIT SECONDS=2

This code specifies the button click. The TYPE specifies what type of element to click on. ATTR=NAME specifies the name of the element to click on. 

TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=NAME:btnG

This code specifies new text input into the text field. 

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:q CONTENT=I'm<SP>Botman<SP>Blog

This code specifies navigation to a new URL. 

URL GOTO=imbotman.blogspot.com

This code specifies clicking on a specific link on the page. It is just a A HTML Tag with the value I'm Botman

TAG POS=2 TYPE=A ATTR=TXT:I'm<SP>Botman

This code specifies a simple textual element to click on the web page 

TAG POS=1 TYPE=DIV ATTR=TXT:Botman

Let's review what we've learned!

We've identified the container and program to unlock web automation

We created our first mini bot process.

We've identified basic fundamental features of iMacros. We've seen the syntax that iMacros utilizes to execute web automation. 

Feel free to leave some comments if you would like to see some other specific examples on this page or on the YouTube demo as shown at the top. 

Botman


Monday, March 28, 2016

I'm Botman

If you've reached this page, it is by no mistake. You are curious about or want to strengthen your knowledge of automation.

I'm Botman. I will be introducing you to a magnificent world of automation through web scripting. I will not be doing this for you, but showing you how to become a fellow Botman. 

There is much to learn and if you are willing to explore this world, I will be your teacher. 

Botman