【发布时间】:2020-06-10 23:13:36
【问题描述】:
我想不通,我在这里做错了什么。
签出下面的脚本,我打算在其中通过SendKeys 方法切换蓝牙启用设置:
@if (@CodeSection == @Batch) @then
@echo off
set SendKeys=CScript //nologo //E:JScript "%~F0"
start "" /b explorer.exe ms-settings:bluetooth
%SendKeys% "{TAB}" & %SendKeys% " "
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.AppActivate "settings":WScript.Sleep 300
WshShell.SendKeys(WScript.Arguments(0));
它不做按键操作,只是打开蓝牙设置窗口并保持原样。
感谢任何帮助。
【问题讨论】:
标签: batch-file vbscript bluetooth settings sendkeys