r/semi_programming • u/martin_m_n_novy • Oct 24 '23
programming languages and tools, that have something like the "sendkeys" function
an answer by BingAI, slightly edited, slightly checked:
Python: The pyautogui module provides a typewrite() function that simulates keyboard input
Java: The java.awt.Robot class provides a keyPress() and keyRelease() method that can simulate key presses and releases
AutoHotkey: A scripting language for Windows that can automate keystrokes and mouse clicks
Selenium WebDriver: A browser automation tool that provides the sendKeys()
method to simulate keyboard input .AutoIt: A scripting language for Windows that can automate keystrokes and mouse clicks .
C#: The SendKeys
class in the System.Windows.Forms
namespace can simulate keyboard input .tmux: A terminal multiplexer for Unix-like operating systems that provides the send-keys
command to send keystrokes to a pane .
(some links, only about tmux:
1. stackoverflow.com 2. unix.stackexchange.com 3. stackoverflow.com)
1
u/martin_m_n_novy Oct 24 '23
https://superuser.com/a/1250038/349723
https://www.excelforum.com/excel-programming-vba-macros/490883-why-doesnt-sendkeys-work-consistently.html#post1417332
apps may steal focus even after the AppActivate and then the SendKeys goes to
the wrong app (the one with focus at the time the statement is called).