windows - 尝试运行 SENDKEYS 命令并得到:'"{TAB}"' 未被识别为内部或外部命令、程序或批处理文件
问题描述
这是我要运行的代码:
@if (@CodeSection == @Batch) @then
@echo off
for /F %%f in (spsip.txt) do (
echo.
echo Start Internet Explorer for: %%f?
choice /m "Are you sure"
if not errorlevel 2 (
rem Use %SendKeys% to send keys to the keyboard buffer
set SendKeys=C:\Windows\System32\cscript.exe //nologo //E:JScript "%~F0"
START "" "http://%%f"
rem the script only works if the application in question is the active window.
timeout /t 10
rem use the tab key to move the cursor to the login and password inputs. Most htmls
rem %SendKeys% "{TAB}"
rem now you can have it send the actual username/password to input box
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "Admin"
%SendKeys% "{TAB}"
%SendKeys% "password"
%SendKeys% "{ENTER}"
)
)
解决方案
推荐阅读
- python - PhraseMatcher 在尝试标记文档中的多个项目时返回空列表
- java - 在序列图中,你能编出你计划在未来实现的功能的名称吗?
- uml - UML 用例图 - 框架作为参与者?
- machine-learning - 如何获得一个良好的二元分类深度神经模型,其中负数据更多位于数据集上?
- saml - 如何正确关联 Gatling 中的 SAML 标头响应
- android - Android Studio - 找不到 org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2
- sql-server - SQL Server 2014 类型 DATE 不是已定义的系统类型
- javascript - 如何在页面加载时执行的 React 组件中包含 javascript 文件?
- r - 对列中的不同值进行分组并在 R 中创建新列(类似于 SQL 中的 AS)
- python - 在 pandas 中生成具有二进制计数值的交叉表类型数据框