Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

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
×
×
  • Create New...