Jump to content
Sign in to follow this  

Script Doesnt Respond after 5 iterations

Recommended Posts

Please Consider the following script and suggest me what to change as the script doesnt responds after 5 iteration.

The Scenario is that:

1) 2 files have to opened in read mode,one contain URLs(chk.txt) and other contains categories(cat.txt)

2) The script reads the first URL from chk.txt file and sends in FF to open.

3) There in FF, cat is read from cat.txt file and send for selection in drop down menu

4) Then everything works fine after necessary steps, but

this scenario stops working after 5 new urls sent from chk.txt file

Provided that The Script doesn't exits..

#include <file.au3>

#include <FF.au3>

$file =FileOpen("chk.txt",0)





While 1


$line =FileReadLine($file,$i)






MouseClick("left",229,43,1) ;For opening URL

send($line,1) ;URL Open from txt file

Send("{ENTER}") ;ENTER for URL


_FFLoadWait() ;Waiting for Page to be Load

MouseClick("left",239,483,1) ;click Add New Post

_FFLoadWait() ; Waiting for page to be loaded

MouseClick("left",526,537,1) ;clicking on cat drop down


send($line1,1) ;sending category from another file

MouseClick("left",530,639,1) ;clicking Next Step


MouseClick("left",650,507,1) ;clicking empty area for activating page


Send("!z") ;robo form fill submit

_FFLoadWait() ;waiting for submission and page redirection

MouseClick("left",367,627,1) ;Click ON Text Field

sleep(15000) ;waiting for providing info

MouseClick("left",508,476,1) ; CLICK FOR GO BACK submit




If _FFIsConnected() Then

_FFLinkClick("GRAND EXPERIENCES offers (abc123)","text")





MouseClick("left",414,45,1) ;copying url


Local $text=ClipGet()





Share this post

Link to post
Share on other sites

You are calling _FFConnect multiple times for each pass of the While loop, which is likely the reason your script is failing. I use the following function in lieu of directly calling _FFConnect and _FFIsConnected:

Func _FFCheckConnection()
Local $result = True

If Not _FFIsConnected() Then
If Not _FFConnect(Default, Default, 3000) Then
$result = False

Return $result

Share this post

Link to post
Share on other sites

Hi Dan

Thanks a lot for your reply,

I implemented your custom function but, it now gives an error after 9 to 10 iterations that:

_FFIsConnected Socket Error 664

Please help me out what to do..

Or may be i wont be defining the function correctly..Please let me know the possible solution


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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...