2012-03-14 43 views

Trả lời

4

Bạn có thể sử dụng vbscript. Ví dụ, tập lệnh này sẽ tắt tiếng loa.

set shell = CreateObject("WScript.Shell") 
shell.run"Sndvol" 
WScript.Sleep 1500 
shell.SendKeys"{TAB}" 
shell.SendKeys" " 
shell.SendKeys"%{F4}" 

Bạn khởi động nó từ giao diện điều khiển với

cscript mute.vbs 

More infos here

+0

Tôi đang sử dụng: \t 'Dim WshShell: Set WshShell = WScript.CreateObject ("WScript.Shell") WshShell.SendKeys WScript.Arguments (0) ' – Eugene

5

Dưới đây là một giải pháp một dòng: Dòng này sẽ gõ "Testing 123" và sau đó nhấn Nhập.

echo >script.vbs set shell = CreateObject("WScript.Shell"):shell.SendKeys "Testing 123{ENTER}" & script.vbs 
Các vấn đề liên quan