Gerry Posted May 17, 2010 Share Posted May 17, 2010 Hi All I'm trying to write an app which must logon to a secure site using VPN and then reset certain PC logon sessions as required, this will be sent to the app via email. I am starting at he Logn to the secure site but I am already having problems here. Try as I may, I am unable to automate this. Here is some of my source code: #include <IE.au3> If Not WinExists("Authception Login Page", "" ) _ Then _OpenBrowser() Func _OpenBrowser() $oIE = ShellExecute ("iexplore.exe", "https://172.20.200.46/Authception/") _WinWaitActivate("Security Alert", "Information" ) ControlClick("Security Alert", "Information you exchange", "Button1") _WinWaitActivate("Authception Login Page - Microsoft Internet Explorer", "https://172.20.200.46/Authception/" ) EndFunc _WinWaitActivate("Authception Login Page", "" ) ControlClick("Authception Login Page", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", 100, 115) MouseClick("Primary", 100, 115) Send("LogonID") ControlClick("Authception Login Page", "", "[Class:IEFrame]", 100, 145) MouseClick("Primary", 100, 145) Send("Password") ControlClick("Authception Login Page", "", "[Class:Internet Explorer_Server]", 50, 170) MouseClick("Primary", 50, 170) Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc I have tried to attach the source code of the logon page but I am unable to attach this as a text file, it under 4KB. Can someone please assist me or give me some directions on how to logon to this site? Gerry Link to comment Share on other sites More sharing options...
Bert Posted May 17, 2010 Share Posted May 17, 2010 Why are you using IE.au3 if you are not using any commands provided by it? I suggest you reread the IE section of the help file. It will answer all your questions, and by using it you can remove all the control clicks and win... when dealing with the IE window. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now