Sign in to follow this  
Followers 0
robatwarofthepokerbots

i need help with basic file command

6 posts in this topic

#1 ·  Posted (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 by robatwarofthepokerbots

Share this post


Link to post
Share on other sites



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

We don't help build bots here.

 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

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 task

please 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 appeare

mr beer man please if you have the answer please can you help me

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

couple 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 by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0