Sign in to follow this  
Followers 0
supadodger

check for remote file and stop execution if it doesnt exist.

7 posts in this topic

i want a remote kill switch in one of my scripts.

i figured the easiest way is to check for a file on a website and if its no longer there to just end.

$exists = InetGet("http://www.mydomain.com", "kill.txt", 1, 0)
If $exists = 0 Then
    MsgBox(0, "Registration Failed", "Registration Failed")

    Else
ENDIF

im sure im doing it wrong because it dont work.

just not sure what im doing wrong.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

$size = InetGetSize("http://www.mydomain.com/kill")
If $size <> 4 Then
    MsgBox(0, "Verification Failed", "Verification Failed")
    Exit
    Else
    ENDIF

that works checking the size.

id still appreciate if anyone knows a better way of doing this.

Edited by supadodger

Share this post


Link to post
Share on other sites

id still appreciate if anyone knows a better way of doing this.

It all depends what the real porpose is of all of this, because in general its not really apreciated by many when you connect to an Internetsite without informing the user of the program.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

It all depends what the real porpose is of all of this, because in general its not really apreciated by many when you connect to an Internetsite without informing the user of the program.

Jos

im making someone a script to automate something they do repeatedly online that usually takes them an hour.

the script is actually done but he wants to "try it out" before he pays me.

i want to be able to kill it if he doesnt pay.

that way he cant take it and not pay me.

Share this post


Link to post
Share on other sites

Maybe just a quick

if $Date > $invoiceDueDate then exit

Then send a new copy once they have paid??

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