Jump to content

hide internet explorer window


jorgeng
 Share

Recommended Posts

#include <Misc.au3>

AutoItSetOption("WinTitleMatchMode",2)

Global $NClick = 0, $Timer

$hDll = DllOpen("user32.dll")

While True
    If _IsPressed('01',$hDll) And _IsPressed('02',$hDll) Then
        $NClick += 1
        If $NClick = 2 And TimerDiff($Timer) < 1000 Then
            $NClick = 0
            HideAllIE()
        EndIf
        $Timer = TimerInit()
        Do
            Sleep(10)
        Until Not(_IsPressed('01',$hDll) And _IsPressed('02',$hDll))

        If $NClick = 2 Then $NClick = 0
    EndIf
    Sleep(10)
WEnd

DllClose($hDll)

Func HideAllIE()
    ConsoleWrite("hide all" & @CRLF)
    $WinList = WinList("Internet Explorer")
    If IsArray($WinList) Then
        For $Index = 1 To $WinList[0][0]
            WinSetState($WinList[$Index][1],"",@SW_HIDE)
        Next
    EndIf
EndFunc

When the words fail... music speaks.

Link to comment
Share on other sites

#include <Misc.au3>

AutoItSetOption("WinTitleMatchMode",2)

Global $NClick = 0, $Timer

$hDll = DllOpen("user32.dll")

While True
If _IsPressed('01',$hDll) And _IsPressed('02',$hDll) Then
$NClick += 1
If $NClick = 2 And TimerDiff($Timer) < 1000 Then
$NClick = 0
HideAllIE()
EndIf
$Timer = TimerInit()
Do
Sleep(10)
Until Not(_IsPressed('01',$hDll) And _IsPressed('02',$hDll))

If $NClick = 2 Then $NClick = 0
EndIf
Sleep(10)
WEnd

DllClose($hDll)

Func HideAllIE()
ConsoleWrite("hide all" & @CRLF)
$WinList = WinList("Internet Explorer")
If IsArray($WinList) Then
For $Index = 1 To $WinList[0][0]
WinSetState($WinList[$Index][1],"",@SW_HIDE)
Next
EndIf
EndFunc

Thanks, doesn't really works.

I have tried to slow down mouse click, but doesn't work.

Edited by jorgeng
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...