Konzine Posted June 3, 2011 Share Posted June 3, 2011 Hello, I am very new to AutoIt, but have worked with it maybe once or twice in the past. What I want to do is basically have a script that every 60 will check a particular webpage (example.com/getstate.php), and by the info being displayed on that webpage, probably 1 word or maybe even just a numeric value, have the script taskkill a program. Can this be done with inetget/read? Thanks. Link to comment Share on other sites More sharing options...
MrMitchell Posted June 4, 2011 Share Posted June 4, 2011 If it's a php file I think it's likely that INetGet will only get the actual file, not the value or whatever it's calculating. Have you tried yet to see what you get? It should be relatively easy... $return = InetGet("http://example.com/getstate.php", Default, 1, 0) ConsoleWrite($return & @CRLF) MsgBox(0, "", $return) Link to comment Share on other sites More sharing options...
Konzine Posted June 4, 2011 Author Share Posted June 4, 2011 The php code I am using is; <?php if ($_GET["button"] == "shutdown") { #save the current timestamp to a file $handle = fopen("timestamp.txt", "w"); fwrite($handle, time()); fclose($handle); print "saved kill message!"; } elseif ($_GET["remote"] == "1") { #check the file to send kill message $handle = fopen("timestamp.txt", "r"); if ($handle) { $buf = $handle; if ((time() - $buf) < 300) { print "#KILL"; } } } ?> Now, I am using read here, but its not posting info to remote at this point. Link to comment Share on other sites More sharing options...
MrMitchell Posted June 6, 2011 Share Posted June 6, 2011 You could probably just use the _IE functions...check the IE Management section in the AutoIt help file. Start with _IECreate()... to open the page. I don't think we have enough info from you to be of any more help. Other than that, I think you need to provide the entire source of the page and/or a link to it, if available. The more info you provide the more detailed responses you'll get. 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