nht3004 Posted May 29, 2010 Share Posted May 29, 2010 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'); } Link to comment Share on other sites More sharing options...
Developers Jos Posted May 29, 2010 Developers Share Posted May 29, 2010 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 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JohnOne Posted May 29, 2010 Share Posted May 29, 2010 InetRead InetGet I imagine there are a few IE functions also 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 More sharing options...
nht3004 Posted May 29, 2010 Author Share Posted May 29, 2010 (edited) InetReadInetGetI imagine there are a few IE functions alsoHi, 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 May 29, 2010 by nht3004 for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Jat421 Posted May 29, 2010 Share Posted May 29, 2010 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. Link to comment Share on other sites More sharing options...
nht3004 Posted May 29, 2010 Author Share Posted May 29, 2010 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? , it could make the computer halt :| for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
CyberneticSoldier Posted May 29, 2010 Share Posted May 29, 2010 (edited) You can make a pause in the loop 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 Edited May 29, 2010 by CyberneticSoldier Link to comment Share on other sites More sharing options...
JohnOne Posted May 29, 2010 Share Posted May 29, 2010 You could use adlibregister in conjunction with a function to use InetGet and download in the background while your script continues. InetRead is in the helpfile with the rest of them. 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 More sharing options...
nht3004 Posted May 29, 2010 Author Share Posted May 29, 2010 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'); } Link to comment Share on other sites More sharing options...
JohnOne Posted May 29, 2010 Share Posted May 29, 2010 Im sorry, but there is nothing I can say about InetGet or AdlibRegister without quoting the helpfile. which you have presumably already read. 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 More sharing options...
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