Jump to content

Killswitch


bundyxc
 Share

Recommended Posts

I need to be able to shut down all copies of my program, when necessary. I guess that this could be called a killswitch. Any ideas on how to do this?

I have a website up at bundyxc.com.. any ideas?

Right now I'm thinking of making a page at bundyxc.com/killswitch, with three links. The program will go to the site, and check how many links there are. If there are three links, it continues. If I want to kill all copies of the program, I'll take out all of the links.

This seems almost barbaric. Is there a cleaner way of making this killswitch? :/

Edited by bundyxc
Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

#include <IE.au3>

Dim $URL = 'www.yahoo.com', $ProcName = 'Process.exe'

Dim $oIE = _IECreate($URL)
$oLinks = _IELinkGetCollection($oIE)

If $oLinks.length < 3 Then
    While ProcessExists($ProcName)
        ProcessClose($ProcName)
    WEnd
EndIf
Right, I understand how to do that.. but are there any cleaner ways of doing this, without having to do something as barbaric as counting links?
Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

Not sure I follow what you are looking for...

Are you wanting something that just magically knows that you don't want someone to run your script?

Is checking for SOMETHING on the internet that you control to allow them to use it still acceptable, you just dont want to count links?

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Link to comment
Share on other sites

I guess I was just looking for something magical. Counting links will work though. :)

Now, on to my second question.. how do I control an entire IE window?

I want my IE window to become hidden, but each time I click a link, it will pop open either a new window, or a new tab, which will unhide the window. Any fixes?

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

I'm quite confuse. You want an internet explorer window which is hidden or minimized? because in a hidden (invisible) internet explorer window you can't click a link, or I'm missing something?

Edit: meh.. nvm, Just use $oIE.visible = False to hide or $oIE.visible = True to show the window.. the rest is as simple as reading the help file :)

Edited by Authenticity
Link to comment
Share on other sites

I'm quite confuse. You want an internet explorer window which is hidden or minimized? because in a hidden (invisible) internet explorer window you can't click a link, or I'm missing something?

My program is clicking links, and browsing the net. Some links are going to open new browsers, and new tabs. I either need a way to disable the opening of new windows/tabs (without changing IE settings), or I need to be able to keep all tabs/windows hidden, and close out of them when the program closes.

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

Attaching a new object is your solution I guess. Get the url of the link, create a new object like $oIEAttach = _IECreate($URL, 1)

But I specifically need it to CLICK the link. lol.

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

You said you have a program that manage the page (I guessed it's IE object) so you should develop a mechanism in which you first differentiate what link should be clicked or not otherwise you'll need to play with the options which you don't want to.

I've already done this. My question is this: How do I make it so that the IE window STAYS hidden? It will hide, but after I click a link that opens a new window/tab, then it unhides it. How do I make it so that it STAYS hidden?

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...