Sign in to follow this  
Followers 0
mdwerne

Close browser tab?

7 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

search for the title

activate the window

send ctrl+f4

:)

Very cool idea! Thanks torels!!

Share this post


Link to post
Share on other sites

I don't use either of those browsers, but most tabbed browsers have a hotkey for closing the active tab (In FireFox it is Ctrl-W I think).

Good luck

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

@danwilli...CTRL+F4 closes the tab only. I think u are misreading it for ALT+F4... :)

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  
Followers 0