NELyon Posted June 3, 2006 Share Posted June 3, 2006 I use ScriptWriter to go to internet explorer webpages automatically. I was wondering if you could make the script pause untill the home page is fully loaded. Heres my code right now. (It opens up google, and searches for naruto videos. www.netscape.com must be homepage) expandcollapse popupOpt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("classname=Shell_TrayWnd","TF_FloatingLangBar_W") If Not WinActive("classname=Shell_TrayWnd","TF_FloatingLangBar_W") Then WinActivate("classname=Shell_TrayWnd","TF_FloatingLangBar_W") WinWaitActive("classname=Shell_TrayWnd","TF_FloatingLangBar_W") MouseMove(21,33) MouseDown("left") MouseUp("left") Sleep(1000) WinWait("Start Menu","All &Programs") If Not WinActive("Start Menu","All &Programs") Then WinActivate("Start Menu","All &Programs") WinWaitActive("Start Menu","All &Programs") MouseMove(77,92) MouseDown("left") MouseUp("left") Sleep(1000) WinWait("Netscape.com - Microsoft Internet Explorer","") If Not WinActive("Netscape.com - Microsoft Internet Explorer","") Then WinActivate("Netscape.com - Microsoft Internet Explorer","") WinWaitActive("Netscape.com - Microsoft Internet Explorer","") sleep ("2500") Send("google.com{ENTER}") WinWait("Netscape Search: Results for ""google.com"" - Microsoft Internet Explorer","") If Not WinActive("Netscape Search: Results for ""google.com"" - Microsoft Internet Explorer","") Then WinActivate("Netscape Search: Results for ""google.com"" - Microsoft Internet Explorer","") WinWaitActive("Netscape Search: Results for ""google.com"" - Microsoft Internet Explorer","") MouseMove(259,255) MouseDown("left") MouseUp("left") Sleep(1000) WinWait("Google - Microsoft Internet Explorer","") If Not WinActive("Google - Microsoft Internet Explorer","") Then WinActivate("Google - Microsoft Internet Explorer","") WinWaitActive("Google - Microsoft Internet Explorer","") sleep ("700") MouseMove(342,330) MouseDown("left") MouseUp("left") Sleep(1000) Send("naruto{SPACE}videos{ENTER}") This code is used on my Windows XP with internet explorer as the default internet. 14 items in my main start menu. (code is also attatched) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 4, 2006 Moderators Share Posted June 4, 2006 Most people use IE.au3 (IE.au3 Help) for automating Inernet Explorer. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
NELyon Posted June 4, 2006 Author Share Posted June 4, 2006 I thought about that but i am using this for more than just automating Internet explorer, but also using it to just automate other programs too. I was just wondering if you could make the program pause untill the IE window was fully loaded. I will just use a "sleep ("2000")" as i've been using before... it will work file. Link to comment Share on other sites More sharing options...
Bert Posted June 4, 2006 Share Posted June 4, 2006 Try changing WinWaitActive("Netscape.com - Microsoft Internet Explorer","")toWinWaitActive("Netscape.com - Microsoft Internet Explorer","Done") The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
NELyon Posted June 4, 2006 Author Share Posted June 4, 2006 YES! it works alot better! Thank you vollyman. Link to comment Share on other sites More sharing options...
Bert Posted June 4, 2006 Share Posted June 4, 2006 Welcome. Glad to be of service. 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