Sign in to follow this  
Followers 0
nht3004

How to synchronize data?

10 posts in this topic

Here is my problem, help me bro!

How can I make my program synchronize data from a sever?

Ok, in details, If I have a text file www.host.com/text.txt, how can I make autoit know that the text.txt changes any thing? I mean update the information and recognize the text was changed.

Example: I'm running an autoit-program call syn.exe

Then I change the content of the text in my sever www.host.com/text.txt

And I want syn.exe to recognize that ^^

That's all I want, thanks bro in advanced ^^!


for(loop=0; loop<infinity; loop++) { alert('I love you'); }

Share this post


Link to post
Share on other sites



what is the intent after you recognised it changed?

Read it?

Copy it to another location?

You could keep record of the size and modification date/time of the file and compare that.

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

#4 ·  Posted (edited)

InetRead

InetGet

I imagine there are a few IE functions also

Hi, first, thank you!

Could you explain it to me? I think that InetGet does the job only when you command!

Example: When you use InetGet, it does the job and when it finishes, the next command works!

I need a script that auto check this while the program running, that means always check, check whenever I have something new on sever!

I've thought about using infinite loop :|, but for sure it is not the right way!

Oh, by the way, I can't find InetRead!

Thanks again anyway ^^!

Edited by nht3004

for(loop=0; loop<infinity; loop++) { alert('I love you'); }

Share this post


Link to post
Share on other sites

Hi, first, thank you!

Could you explain it to me? I think that InetGet does the job only when you command!

Example: When you use InetGet, it does the job and when it finishes, the next command works!

I need a script that auto check this while the program running, that means always check, check whenever I have something new on sever!

I've thought about using infinite loop :|, but for sure it is not the right way!

Oh, by the way, I can't find InetRead!

Thanks again anyway ^^!

I think the only way you can accomplish it by having a script run all the time and checking for changes. Or have a script run as service or something. There has to be something that checks the file every few seconds. As Jos said check for file modified or file size.

Share this post


Link to post
Share on other sites

I think the only way you can accomplish it by having a script run all the time and checking for changes. Or have a script run as service or something. There has to be something that checks the file every few seconds. As Jos said check for file modified or file size.

How about my infinite loop? :mellow:, it could make the computer halt :|

for(loop=0; loop<infinity; loop++) { alert('I love you'); }

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

You can make a pause in the loop :mellow: you can make it so it checks every, say 10 minutes or something. The thing I would wander though, does the update check always have to run? You could for example say it checks once when you start up the program and after that no more. But it all depends on how you want it, it's your choice. Or make options for your users so they can decide if they want continues checks or not (I for one wouldn't like my software to be searching for updates all the time when my internet has a download limit).

edit: the command for pausing is called: sleep. Look it up in the help file to see how it works :P

Edited by CyberneticSoldier

Share this post


Link to post
Share on other sites

Hi guys, thanks for all advices.

@CyberneticSoldier: Yes, update check have to run, always I think ^^

@JohnOne: Actually, I didn't understand you very clearly, could you please make me the simple sample ^^!


for(loop=0; loop<infinity; loop++) { alert('I love you'); }

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  
Followers 0