Jump to content

Recommended Posts

Posted

Is there a way to prevent the program to disapear in the taskbar when using GUISetState(@SW_HIDE, $Window)? I mean, even if the window is invisible, I want to see that it's working in the taskbar.

Thanks

  • Developers
Posted

Is there a way to prevent the program to disapear in the taskbar when using GUISetState(@SW_HIDE, $Window)? I mean, even if the window is invisible, I want to see that it's working in the taskbar.

Thanks

Don't you want to just @SW_MINIMIZE in stead of @SW_HIDE?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Don't you want to just @SW_MINIMIZE in stead of @SW_HIDE?

Well Im switching between 2 windows that have the same title so when I press on the button that bring the second window (and hide the first one), it remove the program from the taskbar for 1sec and instantly bring it back... I just want the program to stay in the taskbar and seem to never leave.

Posted (edited)

Well Im switching between 2 windows that have the same title so when I press on the button that bring the second window (and hide the first one), it remove the program from the taskbar for 1sec and instantly bring it back... I just want the program to stay in the taskbar and seem to never leave.

This should work, you get the idea.

Opt("WinTitleMatchMode",3) ;Exact String
Global $Bool=False
Global $FirstHwd="0x00000000"
Global $SecondHwd="0x00000000"
HotKeySet("{F11}","Change")
Hotkeyset("{ESC}","Quit")
HotKeySet("^{NUMPAD1}","GetWindowOne")
HotKeySet("^{NUMPAD2}","GetWindowTwo")
While 1
Sleep(1000)
WEnd
Func Quit()
Exit
EndFunc
Func Change()
$Bool=Not $Bool
If $Bool=True Then
WinSetState($FirstHwd,"",@SW_MINIMIZE)
WinActiviate($SecondHwd,"")
Else
WinSetState($SecondHwd,"",@SW_MINIMIZE)
WinActiviate($FirstHwd,"")
EndIf
EndFunc
Func GetWindowOne()
    Local $Winlist=WinList()
    For $i = 1 to $Winlist[0][0]
        If WinActive($Winlist[$i][1]) Then
            $FirstHwd=$Winlist[$i][1]
        EndIf
    Next
    Return $FirstHwd
EndFunc
Func GetWindowTwo()
    Local $Winlist=WinList()
    For $i = 1 to $Winlist[0][0]
        If WinActive($Winlist[$i][1]) Then
            $SecondHwd=$Winlist[$i][1]
        EndIf
    Next
    Return $SecondHwd
EndFunc
Edited by Generator

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...