圣者
精华
|
战斗力 鹅
|
回帖 0
注册时间 2012-10-27
|
我刚好最近在搞输入字符。保存为ahk文件,运行时按1输入第一题答案,按2输入第二题,按0退出。
如果考试电脑受控不可以自己拷贝/安装软件,实际上还可以搞badusb/橡皮鸭
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- 1::
- StartTime := A_TickCount
- send,我是第一题答案
- ElapsedTime := A_TickCount - StartTime
- MsgBox, 第一题完毕,用时 %ElapsedTime% 毫秒
- Sleep, 100
- return
- 2::
- StartTime := A_TickCount
- send ,"我是第二题答案"
- ElapsedTime := A_TickCount - StartTime
- MsgBox, 第二题完毕,用时 %ElapsedTime% 毫秒
- Sleep, 100
- return
- 0::
- MsgBox exit.
- ExitApp
- return
复制代码 |
|