web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send keys: waiting for...
Power Automate
Answered

Send keys: waiting for previous terminal command to finish

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Dear all,

 

I managed to use PAD to open a Linux terminal window (via Putty to be exact), then execute a Linux command in the window via Send Key action. Now I need to execute another Linux command via Send Key action again after the previous Linux command is finished. 

 

When the previous command is successfully finished, it will output some standard text, like "Command run successfully". My question is, is it possible for PAD to capture the appearance of specific text like that in that window before running another Send Key action? At this moment I have to insert a "Wait for x seconds" action between two Send Key actions as a workaround. 

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    There is a wait for Tex action in cmd commands. So you should be able to wait for that text to run the next command. In cmd, when the text is not known, I use ECHO END_OF_RESPONSE, and then wait for “END_OF_RESPONSE”

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @MichaelAnnis 

    Thanks for your response; but in my case I am not sending keystrokes to a CMD session. Instead, it is a Linux session started by PAD "Run Application" action, e.g.

     

    1. Run-Application -ApplicationPath C:\Program Files\Putty\Putty.exe -ssh%IP% -%UserName%@%Password%

    2. Send-Keys %KeystrokeSquence1%

    3. Wait 600s

    4. Send-Keys %KeystrokeSequence2%

     

    Currently I have added "Wait 600s" as a workaround. Any ideas? Thanks. 

     

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    There is a “read text on screen (ocr) action. Other than mistaking 1s for ls, it works pretty good.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @MichaelAnnis  Thanks for your suggestion. Based on what you have suggested, I have found an action called "Wait for text on screen (OCR)". I am going to try it. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @MichaelAnnis The action "Wait for text on screen (OCR)" works; although before using this action one has to test it using "Extract Text with OCR" to confirm if the output text would be extracted as expected. Thanks. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 411

#2
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard