Jump to content

Recommended Posts

Posted (edited)

I everybody! I don't want anyone use my computer to visit xxx site so that i have created a function like this:

$FullTitle = WinGetTitle("", "xxx")
    $pid = WinGetProcess($FullTitle)    
    ProcessClose($pid)

And check process repeatly. But it only work with Internet Explorer and some other Applications :). Firefox can't be Close.

And My question is: WHY? ( I want to close firefox)

Edited by Xtupid

Please don't angry if I wrote something wrong because my English vocabulary is very little....

Posted

It's not doing anything on the firefox window because it's not picking up any text to match the "xxx" against. You're going to have to find another way to deal with those kinds of windows.

Posted

Not all porn sites contain "xxx" I'm sure.

I khow! It only is sample function

Anybody know how to slove this problem?

Please don't angry if I wrote something wrong because my English vocabulary is very little....

Posted

Not all porn sites contain "xxx" I'm sure.

I khow! It only is sample function

Anybody know how to slove this problem?

Please don't angry if I wrote something wrong because my English vocabulary is very little....

Posted

The user is trying to match text contained in a window, not the title.

As for Firefox, that's part of it's security. It's not an open book like Internet Explorer. It's possible to read Firefox contents, but it's more complicated.

Posted

Might not be the solution to your issue, but if it is a Windows PC you might have more success by using the "hosts" file to block sites by site name (not a keyword).

These links might help you decide:

http://en.wikipedia.org/wiki/Hosts_file

http://www.mvps.org/winhelp2002/hostsfaq.htm

I know some ways to slove this problem but now I want to construe this :

- I try use AutoIt Window Info to get title of porn site in firefox. For example, it gets "xxx". But firefox still running and AutoIt Window Info has been closed :) ( because it contain "xxx"...WHY firefox is still running?

....

Please don't angry if I wrote something wrong because my English vocabulary is very little....

Posted

I know some ways to slove this problem but now I want to construe this :

- I try use AutoIt Window Info to get title of porn site in firefox. For example, it gets "xxx". But firefox still running and AutoIt Window Info has been closed :) ( because it contain "xxx"...WHY firefox is still running?

....

Preemptive Suicide? :(
Posted

There are many parental control softwares and you wanna make your own ? :)

Anyway that's an interesting exercise.

Posted

Richard told you what you were doing wrong...

;1=start, 2=subStr, 3=exact, 4=advanced, -1 to  -4=Nocase
Opt("WinTitleMatchMode", 2)
$FullTitle = WinGetTitle("xxx", "")
$pid = WinGetProcess($FullTitle)    
ProcessClose($pid)

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...