Desperate to obtain answer to enable users to click vbs icon to automate web authentication to secure website. Want user 2 click on icon,be signed in and then be logged out. Have code to launch website but loginid/password segment has been eluding me 4 several weeks and have to face the piper this Monday. Would like users to be able to automatically logout too but if I could get first segment to work [company id, login id,password] would be estatic. my code currently [test with my email] is as follows, but again can't automate getting login and password and then hitting submit key/enter key. Would the tab & send key codes be useful in this type of scenerio? Pls note this will actually be for a secure online account website that not only needs login id and password but also company id [which is first parameter b 4 loginid and password so its actually 3 inputs. NO MSG BOXES ALLOWED. Just and icon to click login and get back out of application [perhaps sleep a few seconds before it logs out. Thanks immensly.... a whole lot of immensly. Pls assist. should I combine with ASP , javascript, to work? if so how? Remember site is already built so I am not incorporating into and html script. Just trying 2 hit the secure website site.
'[iewithurl.vbs]
' Display a URL
Dim IE
Dim uSERNAME
Dim PASSWORD
Dim crtScreen
Set IE = CreateObject("InternetExpl
orer.Appli
cation")
USERNAME = "I want to put in specific password and login I feed it as an administrator that will always be used no matter who I give vbs icon to....."
PASSWORD = "XXXXXXX"
With IE
.left=200
.top=200
.height=400
.width=400
.menubar=0
.toolbar=1
.statusBar=0
.navigate "
http://mail.yahoo.com/?.intl=us"
.visible=1
End With
'wait a while until IE as finished to load
Do while IE.busy
loop
Set IE = Nothing
WScript.Quit(0)
**************************
**********
**********
**********
********
I HAVE ALSO ADDED THE FOLLOWING SECTION to the end of the previous BUT IT JUST SITS THERE AFTER THE SITE IS LAUNCHED too. at least it did not generate an error but it did not work either. just another idea
**************************
**********
**********
**********
**********
Sub Main
crt.Screen.Synchronous = True
' connect to host on port 23 (the default telnet port)
'
'crt.Session.Connect "/TELNET login.myhost.com 23" *****this was code I saw using telnet instead of http to hit a site which I tried but did not work **********
crt.Screen.WaitForString "ogin:"
'crt.Screen.Send "myusername" & vbCr
crt.Screen.Send "USERNAME" & vbTab
crt.Screen.WaitForString "assword:"
'crt.Screen.Send "mypassword" & vbCr
crt.Screen.Send "PASSWORD" & vbCr
crt.Screen.Synchronous = False
End Sub
WScript.Quit(0)
# $language = "VBScript"
# $interface = "1.0"
' Connect to an SSH server using the SSH2 protocol. Specify the
' username and password and hostname on the command line as well as
' some SSH2 protocol specific options.
Sub Main
'Dim host
Dim Yahooid
'host = "ssh.somecompany.com"
'Dim user
Dim PASSWORD
PASSWORD = " do i put real password here to make it work...don't want it to set up cookies, want it 2 work with specific password and login i feed it initially l"
'user = "myusername"
' Prompt for a password instead of embedding it in a script---DON'T WANT TO DO THIS BUT I WILL IF I HAVE TO...
'
Dim passwd
passwd = crt.Dialog.Prompt("Enter password for " & host, "Login", "",
True)
' Build a command-line string to pass to the Connect method.
'
cmd = "/SSH2 /L " & user & " /PASSWORD " & passwd & " /C 3DES /M MD5
" & host
crt.Session.Connect cmd
End Sub
psl remember this will not be for a simple email sign in. I just used used email to test. I need it to auto sign on to an online account with 3 input fields.
thanks... frustratedprog