This is how you type text or press keys programmatically.
; Press Alt + G to search highlighted text on Google !g:: A_Clipboard := "" ; Clear clipboard Send("^c") ; Copy selection if ClipWait(2) Run("https://google.com" . A_Clipboard) keyboard script v2
Before writing your first script, you must understand the basic building blocks. This is how you type text or press keys programmatically