Jump to content
Sign in to follow this  
thaihoang2812

How do i close a website ?

Recommended Posts

i write a programe is :

If WinExists("sex.com - Microsoft Internet Explorer") Then

MsgBox(0, "", "This is sex website ! You can't open")

EndIf

WinClose("sex.com - Microsoft Internet Explorer", "")

so i can't known if she or he type in the address of Internet Explorer I don't can what doing this work ?

You can help me ? thanks for you ! :)

Share this post


Link to post
Share on other sites

Ni hao ! Try this :

Opt("WinWaitDelay", 1)
$sTitle = "sex.com - Microsoft Internet Explorer"

While 1
    If WinExists($sTitle) Then
        WinClose($sTitle)
        ; MsgBox(0, "", "This is sex website ! You can't open")
    EndIf

    Sleep(10)
WEndoÝ÷ Ù.(!µ©l¡Ê'²'^­§]x-çèZ0x%w­¢zØ^¶¶²Ê'jëh×6#NoTrayIcon

Edited by Helge

Share this post


Link to post
Share on other sites

If anyone types in the address then there's going to be a title somewhere which you

can detect and close anyway. Maybe this one is better as it doesn't allow any windows

with Sex.com in it.. Using a MsgBox isn't smart btw, since then they can just keep the

MsgBox open (which pauses the script) and keep surfing.

Opt("WinTitleMatchMode", 2)
Opt("WinWaitDelay", 1)

$sTitle = "Sex.com"

While 1
    If WinExists($sTitle) Then WinClose($sTitle)
    Sleep(10)
WEnd
Edited by Helge

Share this post


Link to post
Share on other sites

i write a programe is :

If WinExists("sex.com - Microsoft Internet Explorer") Then

MsgBox(0, "", "This is sex website ! You can't open")

EndIf

WinClose("sex.com - Microsoft Internet Explorer", "")

so i can't known if she or he type in the address of Internet Explorer I don't can what doing this work ?

You can help me ? thanks for you ! :)

Are you drunk?

Share this post


Link to post
Share on other sites

If you really wanna know.. Yes, There is.

Ace just stop making these smart remarks post.

I am loosing my patience and you noticed other mods had the same problem.

I have tried to explain some things via PM but it seems that we don't get the message across to you that way.

So here is in clear text: either truly help people of just shut up.

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     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

Isnt there something in IE.au3? Or am I thinking of something else? Ive seen it around here somewhere, and it detects the IE url.

Here is something similar written for ebay.

#include <IE.au3>

While 1
    $oIE = _IEAttach("ebay.com", "url")
    If IsObj($oIE) Then 
        _IENavigate($oIE, "http://disney.go.com/playhouse/today/index.html")
    EndIf
    Sleep(500)
WEnd

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

oh veery good if i can Opt("WinTitleMatchMode", 2)

Opt("WinWaitDelay", 1)

$sTitle = "sex.com"

$sTitle2 = "sex2.com"

While 1

If WinExists($sTitle) Then WinClose($sTitle)

Sleep(10)

WEnd

While 2

If WinExists($sTitle2) Then WinClose($sTitle)

Sleep(10)

WEnd

?/??

Share this post


Link to post
Share on other sites

oR

Opt("WinTitleMatchMode", 2)

Opt("WinWaitDelay", 1)

$sTitle = WinGetTitle("sex1/.com","sex2.com")

While 1

If WinExists($sTitle) Then WinClose($sTitle)

Sleep(10)

WEnd

? how do you hp me ?

Edited by thaihoang2812

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  

×
×
  • Create New...