0

Here's the code I'm trying to run:

@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}"

)

)

jeb
  • 74,839
  • 15
  • 166
  • 215
VBAnewguy
  • 11
  • 4

0 Answers0