很多人經常要輸入大量的數字,比如身份證、手機號碼等,這時使用這個
AHK製作的軟體就十分方便了,它可以一邊連續輸數字一邊按順序讀出來,
就不用擔心輸錯了,也省了檢查的麻煩。
;---------------------------; 語音數字(by FeiYue);---------------------------; 將本指令碼和語音檔案放在一起,編譯即可#NoEnv#SingleInstance forceDetectHiddenWindows, OnMenu, Tray, Icon, Shell32.dll, 15Menu, Tray, NoStandardMenu, Tray, Add, 協助, HelpMenu, Tray, Add, 暫停使用, DoSuspendMenu, Tray, Add, 退出, ExitSubMenu, Tray, Default, 暫停使用Menu, Tray, Click, 1;//在臨時檔案夾建立語音目錄f=%A_Temp%\YuYinShuZiif !InStr(FileExist(f),"D"){ IfExist, %f% { FileSetAttrib, -R, %f% FileDelete, %f% } FileCreateDir, %f%}SetWorkingDir, %f%;//將語音檔案複製到語音目錄IfNotExist, 0.wav FileInstall, 0.wav, %f%\0.wavIfNotExist, 1.wav FileInstall, 1.wav, %f%\1.wavIfNotExist, 2.wav FileInstall, 2.wav, %f%\2.wavIfNotExist, 3.wav FileInstall, 3.wav, %f%\3.wavIfNotExist, 4.wav FileInstall, 4.wav, %f%\4.wavIfNotExist, 5.wav FileInstall, 5.wav, %f%\5.wavIfNotExist, 6.wav FileInstall, 6.wav, %f%\6.wavIfNotExist, 7.wav FileInstall, 7.wav, %f%\7.wavIfNotExist, 8.wav FileInstall, 8.wav, %f%\8.wavIfNotExist, 9.wav FileInstall, 9.wav, %f%\9.wavIfNotExist, 10.wav FileInstall, 10.wav, %f%\10.wav;//只允許一個本程式運行pid:=DllCall("GetCurrentProcessId")WinGet, name, ProcessName, ahk_pid %pid%Loop, 2 { WinGet, list, List, ahk_class AutoHotkey if (list=1) Break Loop, %list% { id:=list%A_Index% WinGet, p, PID, ahk_id %id% if (p=pid) Continue WinGet, n, ProcessName, ahk_id %id% if (n=name) { WinClose, ahk_id %id% WinWaitClose, ahk_id %id%,, 1 if ErrorLevel WinKill, ahk_id %id%,, 1 } }};//設定熱鍵Loop, 10 { i:=A_Index-1 Hotkey, $%i%, sound ;//膝上型電腦有需要 Hotkey, Numpad%i%, sound}Hotkey, $., sound ;//膝上型電腦有需要Hotkey, NumpadDot, sound;//緩衝後面的按鍵CriticalReturnsound:k:=SubStr(A_ThisHotkey,0)if (k="t" or k="."){ SendRaw . SoundPlay, %f%\10.wav}else{ SendRaw %k% SoundPlay, %f%\%k%.wav}Sleep, 150ReturnHelp:MsgBox, 4096, 使用協助,(`n 語音數字(by FeiYue)`n`n 本程式的用途:在小鍵盤或主鍵盤上`n 按數字(0-9)和點(.)時會讀出聲音。`n 暫停使用:左鍵點一下右下腳的程式表徵圖。`n 【當用小鍵盤輸入QQ密碼時要暫停使用】`n 退出程式:右鍵點擊程式表徵圖再選擇退出。), 30ReturnDoSuspend:SuspendReturnExitSub:ExitApp