atnextc Posted July 23, 2009 Posted July 23, 2009 OK I have a script that I have that opens a new instance of IE and browses to a particular website. What i want to do is have it look for an open instance of IE and if open then just create a new tab and proceed if necessary but if IE isn't open then just go ahead and open up the instance and proceed as needed. Thanks #include <IE.au3> $number = InputBox("CRM Login Information", "Please Enter Your Vdshosting Username Only", "") $number1 = InputBox("CRM Login Information", "Please Enter Your Password", "") SplashTextOn("CRM Information", "This will Block Keyboard Input and Mouse") Sleep(3000) SplashOff() BlockInput(1) ; Check the user's answer to the prompt (see the help file for MsgBox return values) Run("C:\Program Files\Internet Explorer\iexplore.exe", "", @SW_MAXIMIZE) WinWaitActive("Yahoo! - Windows Internet Explorer") MouseMove(155, 42) MouseClick("Left") Sleep(500) Send("{Backspace}") Sleep(500) Send("http://companywebsite.com") Send("{Enter}") WinWaitActive("Connect to crm..company.net") Send("domain\") Send($number) Send("{Tab}") Send($number1) Send("{Enter}") Sleep(8000) MouseMove(42, 484) MouseClick("Left") Sleep(1000) MouseMove(1025, 279) MouseClick("Left") Sleep(1000) MouseMove(1019, 407) MouseClick("Left") BlockInput(0) Exit
darkmaster071 Posted July 24, 2009 Posted July 24, 2009 (edited) You should take a look at the _IE functions, they should be alot better then mouseclicks and key sends: $var=_IECreate() ; create function has the option to attach to an existing window i think $hIE = _IEPropertyGet($var, "hwnd") WinSetState($hIE, "", @SW_MAXIMIZE) ;maximize _IENavigate() ;navigate to url _IEGetObjByName() _IEAction() . .. ... Look at the helpfile (F1) Edited July 24, 2009 by darkmaster071
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