Jump to content
Sign in to follow this  

[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)
    MsgBox(0,"", $FileContent)

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

Share this post

Link to post
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")

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post

Link to post
Share on other sites

hi jamesstp20,

Try calling InetGet function like this:

The 1 in the third parameter indicates that the function should force a reload from the remote site.


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...