Sign in to follow this  
Followers 0
jorgeng

hide internet explorer window

6 posts in this topic

Is it possible to hide all internet explorer windows in autoit by double-klicking left and right mouse buttons at the same time?

:bye:

Share this post


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


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Probably, but why?

The boss comes..

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

#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

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