VBS中如何通过命令所带的参数作为变量值通过SendKeys输出
哪位兄弟帮我修改下里面的VBS代码,使之最后在词本里输出的是命令所带的参数abcdef123456批处理带VBS代码如下:@echooffsetvbs=test.vbsf...
哪位兄弟帮我修改下里面的VBS代码,使之最后在词本里输出的是命令所带的参数
abcdef
123456
批处理带VBS代码如下:
@echo off
set vbs=test.vbs
for /f "delims=:" %%a in ('findstr /n /b ":vbs" %0') do (more +%%a %0>"%vbs%")
start "" "%vbs%" abcdef 123456
exit
:vbs
Dim a,user,pass
set a=WScript.CreateObject("WScript.shell")
user=Wscript.Arguments(0)
pass=Wscript.Arguments(1)
a.run """notepad"""
WScript.Sleep 1000
a.SendKeys "user"
a.SendKeys "{ENTER}"
a.SendKeys "pass"
a.SendKeys "{ENTER}" 展开
abcdef
123456
批处理带VBS代码如下:
@echo off
set vbs=test.vbs
for /f "delims=:" %%a in ('findstr /n /b ":vbs" %0') do (more +%%a %0>"%vbs%")
start "" "%vbs%" abcdef 123456
exit
:vbs
Dim a,user,pass
set a=WScript.CreateObject("WScript.shell")
user=Wscript.Arguments(0)
pass=Wscript.Arguments(1)
a.run """notepad"""
WScript.Sleep 1000
a.SendKeys "user"
a.SendKeys "{ENTER}"
a.SendKeys "pass"
a.SendKeys "{ENTER}" 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询