Free Power Automate is a language that can automate work with mouse operation
This time we will introduce Microsoft's "Power Automate for Desktop". This tool runs on Windows and realizes automatic processing by arranging tasks by mouse operation. It has been available for free since March of this year. Also, Windows 11 comes pre-installed. I will introduce it in this series because it has basic programming language functions such as variables, conditional branching, and repetition.
What is Power Automate for Desktop?
Power Automate for Desktop (hereafter abbreviated as PAD) is a tool for automating tasks developed by Microsoft. The feature of PAD is that it was developed as a tool called "RPA" (Robotic Process Automation), which refers to automation that performs advanced work on behalf of humans, and "low-code", which automates work with almost no programming. . By the way, it can be used for free on Windows 10 or later OS.
In addition, there is a reason for introducing it as one of the programming languages in this series. Basic flow control such as repetition and conditional branching is possible, and variables can also be used, so by using these, complex processing can be realized.
Also, as you can see from the fact that PAD is advertised as Desktop, it runs on the Windows desktop. Applications running on Windows, including Excel, can be automatically operated. File processing such as copying, compression, and encryption are also possible.
Install Power Automate for Desktop
Now let's install PAD. The installation can be downloaded from Microsoft's Power Desktop for Desktops website. In addition, Windows 11 is installed from the beginning. For Windows 10, download and install from the link "Download for free". It's pre-installed on Windows 11.
Let's create the simplest flow
Once the installation is complete, click [Power Automate > Power Automate] from the start menu to start it. At the first launch, you will be prompted to enter your Microsft account.
Once you enter your account, you will see a screen like this. Now, click the "+ New Flow" button in the upper left.
In PAD, programs are called "flows". Give your flow a name and click the Create button.
Then you will be presented with a flow edit screen like the one below. Many actions are lined up on the left side of the screen. Look for "Message Box" from the actions here. Then click the message box and drag the "Show message" that appears and paste it on the canvas in the center of the screen.
Then you will see the details of the action called "Show message", so let's enter a message like the following image here. Then click the "Save" button on the bottom right.
Then press the Run button at the top of the screen or click Debug > Run from the menu at the top of the screen. Then the flow is executed as follows.
In this way, you can create a flow by selecting an action on the left side of the screen and dragging it onto the canvas.
Is it possible to run the FizzBuzz problem, which is a regular feature of this series?
Now, let's get to the point. In this series, I always make a program for FizzBuzz. Is it possible to program FizzBuzz using PAD?
The FizzBuzz problem is the following program.
> Write a program that prints the numbers from 1 to 100. However, if it's a multiple of 3, please write "Fizz" instead of a number, and if it's a multiple of 5, write "Buzz". Display "FizzBuzz" for multiples of 3 and 5.
From the conclusion, it is possible to write FizzBuzz problems with ease. You can easily create a program that solves FizzBuzz problems by selecting [Condition > If] or [Loop > Loop] from the actions.
Specifically, let's assemble the following flow.
When you run the program, a file dialog will appear. Specify the save file name here. Then the cursor starts to move with great momentum. Once the flow has finished running, a file will be saved with the FizzBuzz results. If you open it with notepad, it will look like this:
Summary
So far, we have introduced Power Automate for Desktop. You can easily build and execute a flow by selecting various actions with mouse operations. Moreover, variables and control syntax can be used, and there is also a function called "subflow" that corresponds to the function of the programming language. As a result, you can achieve more complex processing than you think.
And there is an action called "script" that can execute PowerShell, DOS commands, VBScript and JavaScript. This script can fill in the missing functionality in PAD. If you use this, you can greatly expand the possibilities of PAD.
Basically, it is not difficult because it is assumed that people other than programmers will use it. Each element of the program is simply replaced with tiles (actions), so if you touch it a little, you will be able to use it immediately.
Of course, some people may feel that "Mouse operation is frustrating" or "It is faster to create a program with Python or VBA". Even so, the fact that it can be used by non-programmers, the fact that it can easily use functions specialized for office work such as Excel, and the fact that it can be used without researching or thinking deeply is a big advantage.
In addition, Windows 11 comes standard with it, so there will be more opportunities to use it for business in the future. From a programmer's point of view, it would be good to touch lightly as "one of the tastes".