Dim ProcID As Integer
' Start the Calculator application, and store the process id.
ProcID = Shell("CALC.EXE", AppWinStyle.NormalFocus)
' Activate the Calculator application.
AppActivate(ProcID)
SendKeys.SendWait("22")
SendKeys.SendWait("*")
SendKeys.SendWait("44")
SendKeys.SendWait("=")
' Start the Calculator application, and store the process id.
ProcID = Shell("CALC.EXE", AppWinStyle.NormalFocus)
' Activate the Calculator application.
AppActivate(ProcID)
SendKeys.SendWait("22")
SendKeys.SendWait("*")
SendKeys.SendWait("44")
SendKeys.SendWait("=")

本文介绍了一种使用AutoIt脚本语言来自动化控制Windows计算器应用程序的方法。通过发送按键指令实现计算器的基本运算,如输入数字22乘以44并得到结果。

被折叠的 条评论
为什么被折叠?



