This article is contributed by netizen
Blue Creative Elite Team, welcome to repost and shareOriginal author: Blue Creative Elite Team
Original link: https://blog.csdn.net/i2blue/article/details/125037626
Introduction
I introduced RPA earlier; it's essentially a concept of robotic process automation.
There are many products based on RPA, among which Power Automate Desktop (PAD) is a relatively free and easy-to-use RPA tool. Its internationalization is also quite good, and the Chinese localization is excellent.
Similarly, the domestic RPA product Yingdao (影刀) is a similar tool. Once you master PAD, using Yingdao will feel very natural.
Of course, there are some inconveniences in actual use. For instance, you must first have a Microsoft account.
Additionally, there are restrictions on the operating system—it requires Windows 10 or later.
Thus, Windows 7 or the Home edition of Windows 10 might encounter some issues.
Also, Windows 11 comes with it pre-installed, effectively making it a default Windows RPA tool (you can search for the keyword).
Installation and Deployment
The installation link is as follows:
https://go.microsoft.com/fwlink/?linkid=2102613

Just click Next.

Personally, I usually select all options, but you can choose according to your needs when installing.

After clicking Install, the following option appears; select Yes.

Then it begins installing automatically.

At this point, installation is complete, and the service can be enabled.
Login to Account

After successful login, you see this interface. Since I had created flows before, it looks like this.

Brief Introduction to the PAD Interface

- Create a new workflow task, like the list below, once created.
- Desktop flows created under your personal account.
- Built-in flows from the official system website.
- Run a flow.
- Edit/modify.
- Other settings.
After clicking Edit (5), the PAD flow designer appears, as shown below.

The left side contains the corresponding logic function components, the middle shows the flow logic, and the right side is for variables.
For a clearer view of the left side:

Functions are available in abundance, basically:

Additionally, some features require support from Microsoft's online cloud platform, requiring accounts, keys, etc.
Overall, it targets global Windows desktop users, but for many practical scenarios in China, there are no specific universal solutions; they can only be implemented through component extensions.
Official Demo Showcase
The official examples include three demos: Excel automation, Web automation, and Desktop automation.



These three types are quite simple. I'll pick one to demonstrate. If you want to learn, just click each one, and you'll basically get it.
Of course, if you know programming, you'll master it in about half an hour.

I choose this one: open Notepad, write something into it, then close Notepad, read what was written, and display it.
I'll modify it based on this example to meet the following business requirement:
Requirement:
Open Notepad, write something into it, then close Notepad, read what was written, and display it.
Click Edit, and it will look like this:

Then this window appears:

Click "Got it," and it becomes like this:

Running it directly will cause an error.

We need to update the UI element path to the current path.

Double-click the "Populate text field in window" action.

- First, the text field's UI element path.
- Second, the text to input into the text field (can be changed to Chinese).
- Third, save this action.
For the second step, you can click around yourself—remember to click after opening Notepad.

The adding process is as follows: To add a UI element, simply Ctrl+left-click.

After modification, run it directly, and the result is exactly as expected.

We also add the corresponding logic based on the requirement above.
The result is quite pleasing.

The Code Example for This:
IF (File.IfFile.Exists File: $'''C:\\Users\\kess\\Desktop\\测试.txt''') THEN
File.Delete Files: $'''C:\\Users\\kess\\Desktop\\测试.txt'''
END
System.RunApplication.RunApplicationAndWaitToLoad ApplicationPath: $'''notepad.exe''' WindowStyle: System.ProcessWindowStyle.Maximized Timeout: 0 ProcessId=> AppProcessId WindowHandle=> WindowHandle
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
UIAutomation.PopulateTextField TextField: appmask['Window \'无标题 - 记事本\'']['Document \'文本编辑器\''] Text: $'''你好,
蓝创精英团队。
%CurrentDateTime%''' Mode: UIAutomation.PopulateTextMode.Replace ClickType: UIAutomation.PopulateMouseClickType.SingleClick
MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''{Control}{Shift}({S})''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
UIAutomation.Click Element: appmask['Window \'*无标题 - 记事本\'']['Tree Item \'桌面\''] ClickType: UIAutomation.ClickType.LeftClick MousePositionRelativeToElement: UIAutomation.RectangleEdgePoint.MiddleCenter OffsetX: 0 OffsetY: 0
UIAutomation.PopulateTextField TextField: appmask['Window \'*无标题 - 记事本\'']['Edit \'文件名:\''] Text: $'''测试.txt''' Mode: UIAutomation.PopulateTextMode.Replace ClickType: UIAutomation.PopulateMouseClickType.SingleClick
UIAutomation.Click Element: appmask['Window \'*无标题 - 记事本\'']['Button \'保存(S)\''] ClickType: UIAutomation.ClickType.LeftClick MousePositionRelativeToElement: UIAutomation.RectangleEdgePoint.MiddleCenter OffsetX: 0 OffsetY: 0
WAIT (UIAutomation.WaitForWindow.ToClose Window: appmask['Window \'测试.txt - 记事本\'']['Window \'另存为\'']) FOR 3
ON ERROR
END
System.TerminateProcess.TerminateProcessById ProcessId: AppProcessId
File.ReadTextFromFile.ReadText File: $'''C:\\Users\\kess\\Desktop\\测试.txt''' Encoding: File.TextFileEncoding.UTF8 Content=> FileContents
Display.ShowMessageDialog.ShowMessage Title: $'''从文本中获取到的内容''' Message: FileContents Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
How to use this code? In the flow logic, press Ctrl+Alt+A to select all, then copy and paste. That’s the whole code.
Similarly, when creating a new workflow, you can directly click in the flow logic area and paste. It will appear.

Currently, there is no good sharing solution.
This method is still relatively cost-effective.
Personal Summary After Use
After using it, I found that it has no ads and is essentially a built-in system tool. So I’m quite optimistic about it. However, many of its features are not very comprehensive, and for many slightly complex scenarios, custom components are still needed. Does it support components? The good news is that it does, but the official documentation doesn’t explicitly say so.
Nevertheless, it actually supports them, so you know what that means.
Conclusion
So far, we have introduced, installed, briefly described, and modified an official example, as well as implemented custom functionality. I believe you now have a concrete understanding of RPA technology and products like PAD.
Boost productivity starting now. Go for it!!!
Your support and attention are my motivation! With your support, the Blue Creative Elite Team will do even better.
The next chapter will cover how to extend PAD components to make it even more powerful.
References
You can learn most functions through the official website:
https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference