Ideal Automate Overview

Pluralsight Free Trial

LinkedIn Premium uses PayScale to estimate job salaries

Premium (Not Free) Video Tutorials

Free Video Tutorials & Free Tools

Ideal Automate Overview

Ideal Automate 5-Minute Hello World Example

Open Source C# Development Platform for Automating Computer Tasks

Ideal Automate is an open source development platform that allows C# developers to automate any repetitive task and to share what they have automated with other developers.

Ideal Automate allows one to automate almost any task. It does this by making it possible for you to write scripts that can find images on the screen. By finding an image on the screen, you are able to locate where you want to read or write something, regardless of which application the image resides within. The fact that you can read and write to virtually any location makes it possible to create a degree of artificial intelligence where the script is able to perform real-time, problem-solving activities. For example, the script can read a piece of information, interpret what it has read, and then make decisions in real time about what to do based on that interpretation.

Ideal Automate is based on the reuse of scripts that others have built. The ideal is that one person solves a problem and many can benefit from that solution when it is published.

Three Components of IdealAutomate

Ideal Automate consists of three basic components: 1) a WPF application called IdealAutomate that serves as a front-end menu for your repository of C# automation applications; 2) an open source C# class library .dll called IdealAutomateCore that contains about 30 methods you can use in automating tasks; and 3) the individual automation applications that you write in C#.

1. IdealAutomate – This is a simple WPF C# application that allows you to easily execute (behind the scenes) the DOS command to run any application with the content you specify. This makes it possible for you to create a menu, which serves as the front-end to your central repository of C# applications. The WPF Application provides a mechanism for assigning hotkeys to the applications. A HotKey makes where you can execute an application just by pressing a combination of keys. Here is a screenshot of the IdealAutomate component:

Ideal Automate

2. IdealAutomateCore – This is a class library that contains most of the methods that are commonly used to automate any task on the computer. For example, there are methods that allow you to easily do the following things:

A. Find an image on the screen and click on it
B. Display a window that will allow users to provide input using most of the standard controls (textbox, dropdownlist, etc.)
C. Automatically type text on the screen at any location
D. Get and Put information into the clipboard
E. Run another application as a process thread.

3. ActionScripts – Each application that you write that uses the IdealAutomateCore class library is referred to as an "automation script," or "script" for short. A script is created by using Visual Studio to create a new C# WPF application that is based on the IdealAutomateCore project template. This template makes sure that your project includes a reference to the IdealAutomateCore Class Library. The project template also provides excellent examples of how to use most of the methods you will need. Scripts do not involve learning a special scripting language. This allows you to leverage your existing C# knowledge.

An Abstract Algorithm that can be used to Solve Any Problem

Here is an abstract algorithm that can be used to solve any problem:

1. A Problem arises when there is a "gap" between the Actual and the Ideal.
2. The first step to solving the problem is to compare the Actual to the Ideal and find the Differences.
3. Once the Differences have been identified, we need to translate those differences into Actions that we know how to perform.
4. Once the Differences have been translated into Actions, we perform those actions on the Actual in order to Transform it into the Ideal.

When we learn how to automate the above algorithm, we can go on "autopilot" and let the computer solve any problem that arises. Until that time, we can automate manual repetitive tasks one at time, but we should prioritize those tasks based on the cost savings. Tasks where the effort to automate is greater than the rewards produced should not be automated.

I use two types of libraries to help me in this process of transforming the actual into the ideal – Knowledge Base Library and Action Script Library.

1. Knowledge Base Library

Abstract Spoon ToDoList

The first type of library is my "knowledge base." I use Abstract Spoon's open source ToDoList as my knowledge base, but you can use any type of knowledge base that you want. The knowledge base is just a dictionary that defines "unknown things" in terms of "known things." In order for a knowledge base to work, we must start out with some basic things that we "innately know" and build up from those basic building blocks. The types of things that we innately know include such things as being able to read and write information and recognize shapes and patterns on the computer screen and so on. These basic building blocks are meaningful to us because we know what they represent or what they can be used to accomplish.

When we define other things in terms of basic building blocks, we are transforming what was previously meaningless to us into what is meaningful. It is in this way that we expand our world of meaning. We can only solve problems when we are dealing with things that are meaningful to us. When we can not translate something complex into something more simple that we already understand, we are blocked in our problem solving process. This is why a knowledge base is one of the important libraries that we need in the problem solving process.

The knowledge base contains a repository of everything we understand and of everything that is meaningful to us. Once we translate the differences that exist between the actual and the ideal into items that are contained in our knowledge base, we can begin the process of solving the problem. Once the differences between the actual and the ideal are meaningful to us, we have the tools at our disposal to start figuring out the steps that we need to take to remove the differences one step at a time. If we know all of the simple components that go into making up one of the differences between the actual and the ideal, we can work from the level of those simple components that we understand to remove that larger difference that we did not at first appear to understand.

Suppose, for example, that when we compare the actual to the ideal, we find that we need to add a textbox to the actual web page in order to transform it into the ideal. If we did not know all of the details about what makes a textbox different from a label, we would not be able to identify whether a textbox or label was what was causing the actual to be different from the ideal. Similarly, if we did not know all the detail steps involved in adding a textbox to a web page, we would be at a loss. However, if the knowledge base provides us with all of that information, we can proceed to identify the difference between the actual and the ideal as being a textbox and then we can take each of the steps cataloged in the knowledge base in order to change the actual into the ideal.

The knowledge base that I build with Abstract Spoon's software is not something rigid and formal. It is basically a set of notes that I take everytime I learn something new. I do not formally tie everything back to the ultimate basic building blocks of things that I innately know. I just try to keep my knowledgebase simple and structure it the best I can as I proceed.

2. ActionScript Library

The knowledge base just provides me with the information that I need in order to accomplish the task manually. However, if I notice that I am performing the same task over and over again, I may want to automate that process. When I want to automate an item in my knowledge base, I set a flag on that item to remind me that I would like to automate this someday. This is where the second type of library that is involved in the problem-solving process comes into play. This second type of library is called the action script library. The action script library consists of the three components described above as the three components of IdealAutomate.

Let us look at the example of adding a textbox to a webpage. In this example, we can write a C# application that has a reference to the IdealAutomateCore library that can perform all of the steps needed in order to add any textbox to any webpage. The application will take some initial parameters from the user that specify some of the specifics regarding the textbox and the webpage, and then it will perform all the required steps without requiring our intervention of decision-making skills. Everytime we have to make a decision manually, it takes energy and time on our part, but when we automate that, the energy and time are no longer required from us.

This blog uses the cross-linker plugin developed by Web-Developers.Net