Jump to content

Recommended Posts

Posted

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)

Opt("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)

  • Moderators
Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...