robatwarofthepokerbots Posted October 14, 2010 Share Posted October 14, 2010 (edited) hello please can some one help me my code is below this is what im trying to do im reading a richedit20w i can get the text easy enought i can read the file search for words in it ,eg Deaaler and so on the problem if when i reach th eof text file what im trying to do is read the file ( save the line number of the last line read) then delete the file re capture the text from richedit20w reopen the file paste the new text in then to carry on reading from the last line,1 have saved saved the line number in a ini file any help would be grateful if you no any other ways of acheving my goal please help me ; just experimenting with richedit20w1 #include <File.au3> opt("wintitlematchmode",2) global $table = "Play" ;pokersite short name $file = ("data/table") $file2 = ("data/table2") iniWrite($file2,"a","a","O" ) ; the reason i have put this in is so when the script is first read it will start from 0 $text = ControlGettext ( $table, "", "RichEdit20W1") while 1 FileDelete ($file) sleep(2000) FileOpen($file, 0) IniWritesection($file,'a','a',$text) For $i = $file2 to _FileCountLines($file) fileWrite($file,$text ) $line = FilereadLine($file, $i) if StringInStr($line,"Dealing down cards") then msgbox(0,'','the line ' & $i & ' is ' & $line,1) EndIf Next IniDelete($file,'a','a') sleep(1000) $varxx = ("data/table2") iniWrite($varxx,"a","a",$i) msgbox("","test","waiting for next line",1) wend Edited October 14, 2010 by robatwarofthepokerbots Link to comment Share on other sites More sharing options...
Somerset Posted October 14, 2010 Share Posted October 14, 2010 hello please can some one help memy code is below this is what im trying to do im reading a richedit20w i can get the text easy enoughti can read the file search for words in it ,eg Deaaler and so onthe problem if when i reach th eof text filewhat im trying to do is read the file ( save the line number of the last line read)then delete the file re capture the text from richedit20wreopen the file paste the new text inthen to carry on reading from the last line,1 have saved saved the line number in a ini fileany help would be gratefulif you no any other ways of acheving my goal please help me; just experimenting with richedit20w1#include <File.au3>opt("wintitlematchmode",2)global $table = "Play" ;pokersite short name$file = ("data/table")$file2 = ("data/table2")iniWrite($file2,"a","a","O" ) ; the reason i have put this in is so when the script is first read it will start from 0$text = ControlGettext ( $table, "", "RichEdit20W1")while 1FileDelete ($file)sleep(2000)FileOpen($file, 0)IniWritesection($file,'a','a',$text)For $i = $file2 to _FileCountLines($file) fileWrite($file,$text ) $line = FilereadLine($file, $i) if StringInStr($line,"Dealing down cards") then msgbox(0,'','the line ' & $i & ' is ' & $line,1) EndIf Next IniDelete($file,'a','a') sleep(1000) $varxx = ("data/table2") iniWrite($varxx,"a","a",$i) msgbox("","test","waiting for next line",1) wendWe don't help build bots here. Link to comment Share on other sites More sharing options...
robatwarofthepokerbots Posted October 14, 2010 Author Share Posted October 14, 2010 We don't help build bots here.hello beerman i dont want help building a bot i want help with the file commands and as for not building bot with this software ,i thought autoit was all about building bots of some for automated taskplease can some 1 help me all i need to no is when i come to the eof text how can i make the next command actually wait for the next command to appearemr beer man please if you have the answer please can you help me Link to comment Share on other sites More sharing options...
robatwarofthepokerbots Posted October 14, 2010 Author Share Posted October 14, 2010 PLEASE PLEASE PLEASE CAN SOME 1 HELP ME I HAVENT SLEPT FOR HOURS I NO THERE WILL BE A SIMPLE WAY AROUND THIS HOW CAN I UPDATE THE FILE IN REAL TIME Link to comment Share on other sites More sharing options...
JohnOne Posted October 14, 2010 Share Posted October 14, 2010 PLEASE PLEASE PLEASECAN SOME 1 HELP MEI HAVENT SLEPT FOR HOURSI NO THERE WILL BE A SIMPLE WAY AROUND THISHOW CAN I UPDATE THE FILE IN REAL TIMEhttp://lmgtfy.com/?q=exercises+for+hyperactive+children AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 14, 2010 Developers Share Posted October 14, 2010 (edited) PLEASE PLEASE PLEASECAN SOME 1 HELP MEI HAVENT SLEPT FOR HOURSI NO THERE WILL BE A SIMPLE WAY AROUND THISHOW CAN I UPDATE THE FILE IN REAL TIMEcouple of things for you to read before posting again in out forums:- Read the sticky about Bits at the top of the Support forum!- DO NOT type caps only. its rude.- Do not create multiple threads on the same topic.- be patient.-... and don't be so stupid to report your own threads after being warned the specific topic is not allow and moan about somebody telling you as such.Next deviation from any of the above will get you a ban.Jos Edited October 14, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts