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 key {Right} to a ...
Power Automate
Suggested Answer

Send key {Right} to a windows in excel - loose focus

(1) ShareShare
ReportReport
Posted on by 2
I have a power automate desktop, where i am using the windows "text to Column" in ExceL

When I am using then flow, its stop working, when I have sendt the Action "Send keys" with right arrow. {Right} 

hwo do I keep focus on the window, when I an using send keys:

the code is
UIAutomation.Click.Click Element: appmask['Window \'Log_5.csv - Excel\'']['Data Item \'A\''] ClickType: UIAutomation.ClickType.LeftClick OffsetX: 5 OffsetY: -6 MousePositionRelativeToElement: UIAutomation.RectangleEdgePoint.BottomCenter

MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}X1K3''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True

MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}N''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True
MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}K''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True
MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}N''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True
MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}s''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True
MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}v''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True
MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''{Right}''' DelayBetweenKeystrokes: 50 SendTextAsHardwareKeys: True
WAIT 0.2
MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}({e})''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True
MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: ExcelInstance3 TextToSend: $'''{Alt}({u})''' DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True
 
Categories:
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    Can you please follow anterantive path like instead of sending {Right}, consider using UI automation actions like “Send key press” with arrow keys or “Move cursor and click” to navigate cells?
     
     
    Some common causes you can troubleshoot:
    1. Focus vs Active Window: Let's ensure the target application or Excel window is active and focused before sending the {Right} key. Let's use the “Activate window” or “Focus window” action right before sending keys.
    2. Timing and Delays: If we can add a delay of say 100ms-300 ms before and/or after the “Send keys” action to allow the UI to process previous actions and be ready for the next keystroke.
    3. Send Keys Method: PAD offers different send keys modes (e.g., “Send window messages” vs. “Send physical keystrokes”). Try switching the send keys method in the action properties to see if one works better for your scenario.
    4. Mix of Uppercase and Lowercase: Please confirm that the syntax {Right} is correct and supported in your PAD version. Sometimes using uppercase or lowercase ({RIGHT} vs {Right}) can matter, we need to test variations here.
    5. Interference from Other Actions: Check if any previous action in the flow is causing the UI to become unresponsive or changing focus unexpectedly.

     


    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!

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 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard