#include <GUIConstants.au3>
#include <WindowsConstants.au3>
Local $YouWin = "恭喜,你答对了"
Local $YouLost = "不好意思,你答错了"
Local $oVoice
$oVoice = ObjCreate("SAPI.SpVoice")
$oVoice.Volume = 100
HotKeySet('!^w', 'WinRun')
HotKeySet('!^l', 'LoseRun')
HotKeySet('{esc}', 'NowExit')
While 1
Sleep(100)
WEnd
Func WinRun()
Local $Gui = GUICreate('', 300, 300, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
GUICtrlCreatePic(@ScriptDir & '\001_18.BMP', 0, 0, 300, 300)
GUISetState()
Sleep(1000)
$oVoice.Speak($YouWin)
Sleep(5000)
GUIDelete($Gui)
EndFunc ;==>WinRun
Func LoseRun()
Local $Gui = GUICreate('', 300, 300, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
GUICtrlCreatePic(@ScriptDir & '\001_19.BMP', 0, 0, 300, 300)
GUISetState()
Sleep(1000)
$oVoice.Speak($YouLost)
Sleep(5000)
GUIDelete($Gui)
EndFunc ;==>LoseRun
Func NowExit()
Exit 0
EndFunc ;==>NowExit 回复 1# 黑菜 |