RhysSkachillKelly Posted January 4, 2013 Share Posted January 4, 2013 Hi all, I'm new to AutoIT and scripting.. I am attempting to create two scripts. Both will launch in a web browser, one will be firefox, the other internet explorer. Then several hyperinks will launch. I am also attempting to have each of them automatically login with generic credentials although I'm not sure on how to do this as of yet.. Any suggestions on that would be helpful! Below is what I have so far for the internet explorer script but I'm having issues with it. I have attached a screenshot of the errors reported in AutoIT. I can't spot where the syntax error is at all but as I said I'm a total beginner.. Can anyone advise? Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWait("Blank Page - Windows Internet Explorer","Favorites Command Ba") If Not WinActive("Blank Page - Windows Internet Explorer","Favorites Command Ba") Then WinActivate("Blank Page - Windows Internet Explorer","Favorites Command Ba") WinWaitActive("Blank Page - Windows Internet Explorer","Favorites Command Ba") #include _IENavigate($o_object, "http://google.com/")" [ $f_wait = 1]) _IELoadWait ($o_object) _IENavigate ($oIE, "http://google.co.uk/"[ $f_wait = 1]) _IELoadWait ($oIE) Thanks in advance! Link to comment Share on other sites More sharing options...
Thatusernameisalreadytaken Posted January 4, 2013 Share Posted January 4, 2013 If there is no $o_object declaration in the first 10 lines of your script then that's the matter. Link to comment Share on other sites More sharing options...
Colyn1337 Posted January 4, 2013 Share Posted January 4, 2013 (edited) Hi all, I'm new to AutoIT and scripting.. I am attempting to create two scripts. Both will launch in a web browser, one will be firefox, the other internet explorer. Then several hyperinks will launch. I am also attempting to have each of them automatically login with generic credentials although I'm not sure on how to do this as of yet.. Any suggestions on that would be helpful! Below is what I have so far for the internet explorer script but I'm having issues with it. I have attached a screenshot of the errors reported in AutoIT. I can't spot where the syntax error is at all but as I said I'm a total beginner.. Can anyone advise? Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWait("Blank Page - Windows Internet Explorer","Favorites Command Ba") If Not WinActive("Blank Page - Windows Internet Explorer","Favorites Command Ba") Then WinActivate("Blank Page - Windows Internet Explorer","Favorites Command Ba") WinWaitActive("Blank Page - Windows Internet Explorer","Favorites Command Ba") #include _IENavigate($o_object, "http://google.com/")" [ $f_wait = 1]) _IELoadWait ($o_object) _IENavigate ($oIE, "http://google.co.uk/"[ $f_wait = 1]) _IELoadWait ($oIE) Thanks in advance! Welcome to AutoIt! I can see from your script that you've been reading the help files included with AutoIt. I have to applaud you for that It looks to me like you're trying to combine COM usage along with the built in UDF's of AutoIt. Run/tweak this in a script session all of it's own, it should help you figure out what you're trying to do... Because you're just using defaults, you don't need to delare them or indicate them. #include <ie.au3> $o_object = _IECreate("googlewebsite") _IELoadWait($o_object) Feel free to post questions. You're doing good, trust me EDIT: Due to the weirdness of this website, I had to take out the google website in my code snippit. Replace googlewebsite with the FQDN for google's homepage. Edited January 5, 2013 by Colyn1337 RhysSkachillKelly 1 Link to comment Share on other sites More sharing options...
RhysSkachillKelly Posted January 23, 2013 Author Share Posted January 23, 2013 Thanks Thatusernameisalreadytaken and Colyn1337 for your help.. One question I do have is where do get ie.au3 to include? I've seen this used in a few example scripts but not sure where this is from. Thanks again! Link to comment Share on other sites More sharing options...
RhysSkachillKelly Posted January 23, 2013 Author Share Posted January 23, 2013 Also - Colyn1337 I have tried out your script which works great. Only problem is it seems to open in smaller window every time. Is it possible to specify for IE to open in full screen? Link to comment Share on other sites More sharing options...
kylomas Posted January 23, 2013 Share Posted January 23, 2013 RhysSkachillKelly,I am also attempting to have each of them automatically login with generic credentials although I'm not sure on how to do this as of yet.Carefull, don't know what "generic" means in this context but you might want to read this.kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
RhysSkachillKelly Posted January 26, 2013 Author Share Posted January 26, 2013 the login credentials isn't important, its not for any kind of bypassing security. Its just for logging into a daily checks web page for my team to perform their checks quickly and efficiently. The web page already has generic credentials so rather than entering the credentials in every tab that opens I'd like the credentials to be entered automatically to save the hassle. Does anyone know if there is a way to specify for the IE window to open in full screen? this would be the final piece to the puzzle 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