Jump to content

Recommended Posts

Posted (edited)

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
Posted

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

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
  • Recently Browsing   0 members

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