;打开记事本——run函数运行可执行文件
Run("notepad.exe")
;等待记事本打开激活
WinWaitActive("无标题 - 记事本")
;向激活窗口发送模拟键击操作
Send("This is some text.")
;关闭窗口
WinClose("无标题 - 记事本")
;等待关闭确认弹窗激活
WinWaitActive("记事本")
;向关闭确认弹窗中发送alt+n,具体对应关系见send函数用法
Send("!n")
Send ( "按键" [, 标志] ):向激活窗口发送模拟键击操作。
https://www.jb51.net/shouce/autoit/AutoIt_CN/html/functions/Send.htm
待整理
原文:https://www.cnblogs.com/ftxy/p/11868844.html