2016-12-03 41 views

回答

1

下面的語音命令將持有密鑰CTRL三秒鐘。您可以更改密鑰以及密鑰持續保存的時間。

' Tested with Dragon NaturallySpeaking 12.5 Professional on Windows 7 SP1 x64 Ultimate 
' From http://nuance-community.custhelp.com/posts/2cd74d2484 
' Lindsay Adam 
' www.pcbyvoice.com 

Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _ 
Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long 

' You can find all the virtual key codes in the following link: 
' http://msdn.microsoft.com/en-us/library/ms927178.aspx 
Const VK_CTRL = 17 

Sub Main 
    keybd_event(VK_CTRL,0,0,0) 
    Wait(3) 
    keybd_event(VK_CTRL,0,2,0) 
End Sub 

http://msdn.microsoft.com/en-us/library/ms927178.aspx(其robots.txt不允許我以反映他們的網站與https://web.archive.org):

enter image description here