Jump to content

[Solved]Unknow Problem


Recommended Posts

Hello, I have a big problem but I can't find why :unsure:

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 by jamesstp20
Link to comment
Share on other sites

$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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...