JinQi Posted March 8, 2009 Posted March 8, 2009 I have tried to send a few commands out to the Firefox. i used this function initially. LoadSite("Some address over here") Func LoadSite($Address) Run("C:\Program Files\Mozilla Firefox\firefox.exe " & $Address) Sleep(100) EndFunc ;Site is loaded for 5 times, i have Send("^w") on the other side to close the 5 tabs after i got what i wanted. BUT Firefox gives me error message such as, if i need to open more pages, i will need to close some pages after a few loops. Am I sending the Run command out too fast? Or I did something wrong? I'm new here by the way. =)
martin Posted March 8, 2009 Posted March 8, 2009 I have tried to send a few commands out to the Firefox. i used this function initially. LoadSite("Some address over here") Func LoadSite($Address) Run("C:\Program Files\Mozilla Firefox\firefox.exe " & $Address) Sleep(100) EndFunc ;Site is loaded for 5 times, i have Send("^w") on the other side to close the 5 tabs after i got what i wanted. BUT Firefox gives me error message such as, if i need to open more pages, i will need to close some pages after a few loops. Am I sending the Run command out too fast? Or I did something wrong? I'm new here by the way. =)Welcome to the AutoIt forums JinQi I tried you code and it worked ok with the url I chose LoadSite("http://www.phy6.org/stargaze/Smap.htm") Func LoadSite($Address) Run("C:\Program Files\Mozilla Firefox\firefox.exe "& $Address ) Sleep(100) EndFunc If the url has spaces in it then that could be a problem and you would need to enclose it in quotation marks like this Run("C:\Program Files\Mozilla Firefox\firefox.exe " & '"' & $Address & '"') Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
JinQi Posted March 8, 2009 Author Posted March 8, 2009 The problem is when I need to load at least 5 pages at once. After a few loops, firefox started to give me error.
FireFox Posted March 8, 2009 Posted March 8, 2009 @JinQiyou can use FF UDF for avoid errors : http://www.autoitscript.com/forum/index.php?showtopic=70821try to use this :WinWaitActive('[CLASS:MozillaUIWindowClass]', '', 5)Cheeers, FireFox.
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