Sign in to follow this  
Followers 0
JinQi

Run/RunWait?

4 posts in this topic

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. =)

Share this post


Link to post
Share on other sites



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 :P

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.

Share this post


Link to post
Share on other sites

The problem is when I need to load at least 5 pages at once.

After a few loops, firefox started to give me error.

Share this post


Link to post
Share on other sites

@JinQi

you can use FF UDF for avoid errors : http://www.autoitscript.com/forum/index.php?showtopic=70821

try to use this :

WinWaitActive('[CLASS:MozillaUIWindowClass]', '', 5)

Cheeers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0