I try to create a VBS script, what started automatically an website. This part could I solve. But now I need to put in this script the function login as And that is the point i stay stucked.
So I hope you can help me. Here is the script I take to open the website
Dim objExplorer
Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
Do While (objExplorer.Busy)
Wscript.Sleep 250
Loop
objExplorer.TheaterMode = False
objExplorer.AddressBar = True
objExplorer.MenuBar = True
objExplorer.StatusBar = True
objExplorer.ToolBar = False
objExplorer.Resizable = True
objExplorer.Height = 600
objExplorer.Width = 800
objExplorer.Left = 0
objExplorer.Top = 0
' objExplorer.FullScreen = True
objExplorer.Silent = False
objExplorer.Visible = True
objExplorer.Navigate https://mi-xxxxx-xxx-xxxxx.xxx.com/xxxxxxxxxxxxx/login.aspx
objExplorer.Login = User
ObjExplorer.Password = Password
wscript.sleep 6000
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("taskkill /F /IM iexplore.exe /T")
Set objExplorer = nothing
I hope there is a easy way to come to an result.
Many thanks for your Help in this case. best Regards Martin
I find an great way to come to need result.
So this task is solved. many thanks for all your commands. best Regards martin
Instead of trying to automate the login via the GUI try inspecting the login process with something like Fiddler. That should give you the actual request that's passing the credentials from the client to the server. With that information you can use an XMLHttpRequest to automate the login:
You may need to adjust the
url
andcredentials
strings according to what Fiddler revealed. You may also need to encode username and/or password with something like this: