Automate Desktop applications
Enable TagUI workflow to control Desktop applications
This example automates a Windows desktop application to create a CSV of a web report. TagUI is used to accomplish this.
It utilises keyboard and image OCR technology to start a robot.
The generated CSV data is used as input to a Microsoft Power Automate Desktop flow.
The flow itself is triggered by TagUI (utilising the image OCR feature) where an image of the command / button to be run in Power Automate Desktop is used as a trigger to ensure the correct navigation item is clicked.
Although this does not directly run an Power Automate Desktop flow from the command line it makes the TagUI script launch the appropriate flow from the UI.
A single PNG image can be changed to run any flow required.
// This is an example of how to use TagUI to control a Windows desktop application.
// It utilises image automation to control the flow
// Keyboard shortcuts are always useful as they may be more efficient
// and reliable than working with images
// The wait command is used to ensure that the app has time to complete its various tasks
// before processing further
timeout 30 seconds
dclick images/frog.png
wait 20
keyboard [tab]
wait 10
click images/web.png
keyboard https://verdapress.uk
click images/start.png
// //1. consider alternative using keyboard short cuts
// //2. consider using clipboard to paste rather than keyboard
// //run as a comparison
wait 20
// if exist('image.png')
// click button1
click images/export.png
keyboard [enter]
click images/clear.png
wait 5
keyboard [alt][f4]
// launch the Power Automate console from which to select the appropriate flow
dclick images/mspad.png
wait 5
//the flow is selected by the image below and then 2 keyboard shortcuts launch the flow
click images/vpfoldertrigger.png
keyboard [tab]
keyboard [enter]
Video: Desktop Application Automation
If you require support or help check out our services page.