การกด Keyboard Shortcuts ใน Power Automate Desktop

by

มีคนเคยถามไว้ใน Microsoft Comunity และก็มีคนมาตอบไว้ดีมาก

วันนี้ก็เลยมาเขียนตัวอย่างง่ายๆ ในการใส่ text, variable, expression, การกดปุ่ม และการกด shortcut ให้ดูกันด้วยคำสั่ง Send Keys

Parameter ของคำสั่ง Send keys

  1. Send keys to เป็นการระบุหน้าต่างที่ให้โรบอททำงาน สามารถเลือกได้ 4 แบบ คือ
  • Foreground window หน้าต่างที่อยู่หน้าสุด (อาจทำงานผิดพลาดได้ ถ้ามีหน้าต่างอะไรเปิดขึ้นมาระหว่างที่โรบอททำงาน)
  • UI element กด Add UI element (ถ้า Window name เปลี่ยนจะทำงานไม่ได้)
  • Window instance/handle เลือก Window instance
  • Title and/or class (ถ้า Title เปลี่ยนจะทำงานไม่ได้)
ตัวอย่างการใช้ Send keys โดยเลือก Send keys to แบบต่างๆ

2. Text to Send

  • Input as text, variable or expression
  • Direct encrypted text input
  • Insert special keys
  • Insert modifier
ตัวอย่างการใช้ Text to send แบบต่างๆ

3. Delay between keystrokes

Default value 10 ms

4. Send Text as hardware keys

ระบุวิธีการใส่ key ถ้า OFF ใช้ไม่ได้ใ้หลองเปลี่ยนเป็น ON

Default value is OFF. If OFF does not work, try ON.

การกด Shortcuts

แบบ 2 ปุ่ม {KeyCode1}({KeyCode2}) เช่น Ctrl+A จะเป็น

{Control}({A})

แบบ 3 ปุ่ม {KeyCode1}({KeyCode2}({Keycode3})) เช่น Ctrl+Shift+N จะเป็น

{Control}({Shift}({N}))

ตัวอย่างการกด Shortcuts

สามารถ copy source code ของบทความนี้ได้จาก link ด้านล่างแล้วนำไปวางที่ Workspace ของ Power Automate Desktop ได้เลย

Video

Did You Enjoy this Article?

Subscription to get new articles sent to your inbox each week for FREE

Question?

If you have any questions or feedback about this article please leave a message in the comments section below.


Comments

Leave a comment

Subscribe to get new articles sent to your inbox each week for FREE