Xtupid Posted May 5, 2008 Share Posted May 5, 2008 (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 May 5, 2008 by Xtupid Please don't angry if I wrote something wrong because my English vocabulary is very little.... Link to comment Share on other sites More sharing options...
covaks Posted May 5, 2008 Share Posted May 5, 2008 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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 5, 2008 Share Posted May 5, 2008 Not all porn sites contain "xxx" I'm sure. Link to comment Share on other sites More sharing options...
Xtupid Posted May 5, 2008 Author Share Posted May 5, 2008 Not all porn sites contain "xxx" I'm sure.I khow! It only is sample functionAnybody know how to slove this problem? Please don't angry if I wrote something wrong because my English vocabulary is very little.... Link to comment Share on other sites More sharing options...
Xtupid Posted May 5, 2008 Author Share Posted May 5, 2008 Not all porn sites contain "xxx" I'm sure.I khow! It only is sample functionAnybody know how to slove this problem? Please don't angry if I wrote something wrong because my English vocabulary is very little.... Link to comment Share on other sites More sharing options...
Triblade Posted May 5, 2008 Share Posted May 5, 2008 You may have to fiddle with WinTitleMatchMode in the AutoItSetOption fuction. My active project(s): A-maze-ing generator (generates a maze) My archived project(s):Â Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 5, 2008 Share Posted May 5, 2008 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. Link to comment Share on other sites More sharing options...
DaRam Posted May 5, 2008 Share Posted May 5, 2008 I khow! It only is sample functionAnybody know how to slove this problem?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_filehttp://www.mvps.org/winhelp2002/hostsfaq.htm Link to comment Share on other sites More sharing options...
Xtupid Posted May 5, 2008 Author Share Posted May 5, 2008 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_filehttp://www.mvps.org/winhelp2002/hostsfaq.htmI 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.... Link to comment Share on other sites More sharing options...
DaRam Posted May 5, 2008 Share Posted May 5, 2008 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? Link to comment Share on other sites More sharing options...
MikeP Posted May 5, 2008 Share Posted May 5, 2008 There are many parental control softwares and you wanna make your own ? Anyway that's an interesting exercise. Link to comment Share on other sites More sharing options...
weaponx Posted May 5, 2008 Share Posted May 5, 2008 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) 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