从命令提示符发送密钥 [英] Sendkeys from command prompt

查看:107
本文介绍了从命令提示符发送密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以从命令提示符(不是)使用(不是)来使用sendkey(或等效的东西)?

Is there a way to use sendkeys (or something equivalent) from (not to) the command prompt?

推荐答案

您可以使用vbscript。例如,此脚本将使扬声器静音。

You can use vbscript. For example, this script will mute the speakers.

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

您使用

cscript mute.vbs

更多信息此处

这篇关于从命令提示符发送密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆