Jump to content

Close browser tab?


mdwerne
 Share

Recommended Posts

All,

If you have teeenagers you may be able to relate to this script.

What I'm trying to do is improve it so that it closes only the browser tab with the matching window title, not the whole browser. IE7 and Opera are the browsers in use.

#NoTrayIcon
#include <Date.au3>

$tCur = _NowTime()
While 1
    Sleep(100)
    If $tCur > "10:00 PM" Then
        If $tCur < "6:00 AM" Then
            If WinExists("MySpace") Then WinClose("MySpace")
        EndIf
    EndIf

WEnd

Thanks,

-Mike

P.S. I don't need an answer, just a pointer in the right direction.

Link to comment
Share on other sites

search for the title

activate the window

send ctrl+f4

:)

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

Ctrl+F4 works with every browser :)

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

What I'm trying to do is improve it so that it closes only the browser tab with the matching window title, not the whole browser.

Ctrl+F4 works with every browser :)

Well yes, it works in every browser, but it does not accomplish what he is trying to do, NOT close the whole browser, but just a tab.
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...