khang0001 Posted August 25, 2010 Share Posted August 25, 2010 My code is #Include <FF.au3> _FFConnect () for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 Then if $text2 = 1 Then _FFClick ("Submit2","name") EndIf EndIf Nextmy code is go to url My link and , if found 2 text is : "xyz" and "go" then click button "Submit2" but my lood for run 8 time and don`t run. what the matter. i don`t understand. please help me Link to comment Share on other sites More sharing options...
rvn Posted August 25, 2010 Share Posted August 25, 2010 loop for 8 times For $i=1 To 8 ConsoleWrite("Loop " & $i & @CRLF) Next but im not sure for your script inside for Link to comment Share on other sites More sharing options...
khang0001 Posted August 25, 2010 Author Share Posted August 25, 2010 loop for 8 times For $i=1 To 8 ConsoleWrite("Loop " & $i & @CRLF) Next but im not sure for your script inside for I don`t understand your code, please write this code in my code. Link to comment Share on other sites More sharing options...
Juvigy Posted August 25, 2010 Share Posted August 25, 2010 Change it a little bit like this: for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 AND $text2 = 1 Then _FFClick ("Submit2","name") EndIf Next And could you please explain better this part : "but my lood for run 8 time and don`t run" Link to comment Share on other sites More sharing options...
AlmarM Posted August 25, 2010 Share Posted August 25, 2010 Change it a little bit like this: for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 AND $text2 = 1 Then _FFClick ("Submit2","name") EndIf Next And could you please explain better this part : "but my lood for run 8 time and don`t run" I think he means that his code runs 8 loops, then quits. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
khang0001 Posted August 25, 2010 Author Share Posted August 25, 2010 (edited) Change it a little bit like this: for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 AND $text2 = 1 Then _FFClick ("Submit2","name") EndIf Next code run but same my code, 8 times very good. but time 9 and 10 very slowly. 8 times first very fast 1 minute and time 9 is 1 minute, time 10 is 1 minute. what the matter with my code Edited August 25, 2010 by khang0001 Link to comment Share on other sites More sharing options...
Grefven Posted August 25, 2010 Share Posted August 25, 2010 (edited) Just an idea, perhaps the webpage you are trying to submit has a built in delay to avoid spamming?perhaps it allows 8 fast submits and then has a 1 minute delay built in?code run but same my code, 8 times very good. but time 9 and 10 very slowly. 8 times first very fast 1 minute and time 9 is 1 minute, time 10 is 1 minute. what the matter with my code Edited August 25, 2010 by Grefven Link to comment Share on other sites More sharing options...
khang0001 Posted August 25, 2010 Author Share Posted August 25, 2010 Just an idea, perhaps the webpage you are trying to submit has a built in delay to avoid spamming?perhaps it allows 8 fast submits and then has a 1 minute delay built in?I don`t think so, because i submits by my hand and i can submits 20 papers very fast. think my code is not good Link to comment Share on other sites More sharing options...
rvn Posted August 25, 2010 Share Posted August 25, 2010 code run but same my code, 8 times very good. but time 9 and 10 very slowly. 8 times first very fast 1 minute and time 9 is 1 minute, time 10 is 1 minute. what the matter with my codeare you sure every page there loading with "fast delay"?if yes then something wrong with your script....if no then nothing wrong with your script....cheer Link to comment Share on other sites More sharing options...
khang0001 Posted August 25, 2010 Author Share Posted August 25, 2010 are you sure every page there loading with "fast delay"?if yes then something wrong with your script....if no then nothing wrong with your script....cheerI sure every page load very fast, page 1 to page 8but page 9 very slowwhat happen my code. Is my code wrong Link to comment Share on other sites More sharing options...
dakishman Posted August 25, 2010 Share Posted August 25, 2010 (edited) My code is #Include <FF.au3> _FFConnect () for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 Then if $text2 = 1 Then _FFClick ("Submit2","name") EndIf EndIf Next my code is go to url My link and , if found 2 text is : "xyz" and "go" then click button "Submit2" but my lood for run 8 time and don`t run. what the matter. i don`t understand. please help me As far as I can tell there is nothing to slow it down. It exicutes 102 times as fast as it can then quits... try something like: #Include <FF.au3> _FFConnect () for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 Then if $text2 = 1 Then _FFClick ("Submit2","name") EndIf EndIf Do Sleep(100) Until WinGetText ( "http://www.abc.com/join.php?g_id=" & $i, "xyz") = 0 Next Or even more simply (But less reliable) add some "Sleep(3000)" (Stops program for 3 seconds for screen loadings or what not.) Hope this helps... P.S. Sorry about poor formatting of the Do loop, I can't seem to get it right in this editor. Edited August 25, 2010 by dakishman I love AutoIT! It doesn't talk back, it doesn't complain that ur on the computer, it loves to be ran over and over and over... but IT STILL DOESN'T DO THE DISHES... Gatta keep da pimp hand strong... Link to comment Share on other sites More sharing options...
khang0001 Posted August 25, 2010 Author Share Posted August 25, 2010 As far as I can tell there is nothing to slow it down. It exicutes 102 times as fast as it can then quits... try something like: #Include <FF.au3> _FFConnect () for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 Then if $text2 = 1 Then _FFClick ("Submit2","name") EndIf EndIf Do Sleep(100) Until WinGetText ( "http://www.abc.com/join.php?g_id=" & $i, "xyz") = 0 Next Or even more simply (But less reliable) add some "Sleep(3000)" (Stops program for 3 seconds for screen loadings or what not.) Hope this helps... P.S. Sorry about poor formatting of the Do loop, I can't seem to get it right in this editor. this code not run, I don`t understand what wrong my code Link to comment Share on other sites More sharing options...
dakishman Posted August 25, 2010 Share Posted August 25, 2010 this code not run, I don`t understand what wrong my code There is no pause in your code... Your code runs all at once... Try: #Include <FF.au3> _FFConnect () for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 Then if $text2 = 1 Then _FFClick ("Submit2","name") EndIf EndIf Sleep(5000) Next I love AutoIT! It doesn't talk back, it doesn't complain that ur on the computer, it loves to be ran over and over and over... but IT STILL DOESN'T DO THE DISHES... Gatta keep da pimp hand strong... Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 25, 2010 Share Posted August 25, 2010 Add the Sleep function after the _FFStart line, to 'pause' the script before the _FFSearch function executes. This may help. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
GMK Posted August 25, 2010 Share Posted August 25, 2010 Does this perform any better for you? #include <FF.au3> _FFConnect() For $i = 98 To 200 _FFStart("http://www.abc.com/join.php?g_id=" & $i, 1, 0) _FFLoadWait() $text1 = _FFSearch("xyz") $text2 = _FFSearch("go") If $text1 = 1 And $text2 = 1 Then _FFClick("Submit2", "name") _FFLoadWait() EndIf Next Link to comment Share on other sites More sharing options...
khang0001 Posted August 26, 2010 Author Share Posted August 26, 2010 There is no pause in your code...Your code runs all at once...Try:#Include <FF.au3>_FFConnect () for $i= 98 to 200 _FFStart ("http://www.abc.com/join.php?g_id=" & $i ,1,0) $text1 = _FFSearch ( "xyz") $text2 = _FFSearch ( "go") if $text1 =1 Then if $text2 = 1 Then _FFClick ("Submit2","name") EndIf EndIf Sleep(5000)Next Add the Sleep function after the _FFStart line, to 'pause' the script before the _FFSearch function executes. This may help. Does this perform any better for you?#include <FF.au3>_FFConnect()For $i = 98 To 200 _FFStart("http://www.abc.com/join.php?g_id=" & $i, 1, 0) _FFLoadWait() $text1 = _FFSearch("xyz") $text2 = _FFSearch("go") If $text1 = 1 And $text2 = 1 Then _FFClick("Submit2", "name") _FFLoadWait() EndIfNext the code not run, it same my code, run 8 times and time 9 very slowly. is my code wrong Link to comment Share on other sites More sharing options...
iamtheky Posted August 27, 2010 Share Posted August 27, 2010 maybe its the start everytime, try it with the _FFtabadd (a la the example) #include "ff.au3" _FFstart ("http://www.google.com/") for $i= 98 to 200 step +1 $text1 = _FFSearch ( "About") $text2 = _FFSearch ( "Google") if $text1 =1 AND $text2 =1 Then msgbox (0 , "" , "they are there") Else msgbox (0 , "" , "they are not there") EndIf _FFTabAdd ("http://www.google.com/") Next _FFquit () exit ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) 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