jamesstp20 Posted May 9, 2011 Posted May 9, 2011 (edited) Hello, I have a big problem but I can't find why I have a FTP which have a txt file: jamesst20.megabyet.net/Commande.txt I am trying to make something that look what is the text and if the text = Update then the script update, if it = Exit then it Exit.... My problem is that when I change the text, the script is supose to know that the text has changed but it doesn't Ok I will explain better: On My script While 1 $FileName = "Commande.txt" InetGet("http://jamesst20.megabyet.net/Commande.txt", @TempDir &"/Commande.txt") $FileOpened = FileOpen(@TempDir &"/" &$FileName, 0) $FileContent = FileRead($FileOpened) FileClose($FileOpened) Sleep(20) MsgBox(0,"", $FileContent) Wend Everything works but if WHILE the script is running I change the text from my FTP, the MsgBox doesn't change and If I exit the script and reopen it, the Msgbox has changed.... Why ? I tried with _FTP_Connect and same thing --' Thanks you Edited May 10, 2011 by jamesstp20
JohnOne Posted May 9, 2011 Posted May 9, 2011 $str = InetRead("http://jamesst20.megabyet.net/Commande.txt", 1) Switch BinaryToString($str) Case "mmmmmmmmmmmmmmmmmmmllllllllllllllllllllll" MsgBox(0, "Do", "Something") Case Else MsgBox(0, "Do", "Something else") EndSwitch AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
smartee Posted May 9, 2011 Posted May 9, 2011 hi jamesstp20, Try calling InetGet function like this: InetGet($url,$filename,1)The 1 in the third parameter indicates that the function should force a reload from the remote site. -smartee
jamesstp20 Posted May 10, 2011 Author Posted May 10, 2011 Thanls you it work !!!!! 2h 30 for only a number XD I can't believe it Thanks you !
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