Sign in to follow this  
Followers 0
Dethredic

Hide a taskbar window

11 posts in this topic

#1 ·  Posted (edited)

I want to be able to run msn have the window maximized, and not have it appear in the taskbar. Can I do that?

EDIT: Not the tray, where all the open windows appear.

Edited by Dethredic

"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites



if you're just looking to avoid having to shell out some cash, windows xp /vista have virtual desktop powertoys. Perhaps w2k , as well, not sure. BTW , if someone knows a good w2k capable virtual desktop engine, sharing would be cool.


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

Posted Image

Is the green one what you mean?


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Yes I mean the green one. I just want to hide 1 window, not all of them.


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

BTW , if someone knows a good w2k capable virtual desktop engine, sharing would be cool.

I use DM2, though I don't often use the Virtual Desktop plugin (included in the standard installation). Looking at the project history, the app should support Win2k.

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

So no ideas?


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

Using Auto3Lib

#include <A3LToolbar.au3>

_TaskbarHideButton("Windows Live Messenger")

Func _TaskbarHideButton($sText, $bHide = True)
    $hToolbar = _Toolbar_FindToolbar("[CLASS:Shell_TrayWnd]", $sText)
    If $hToolbar = 0 Then Return False
    For $i = 0 To _Toolbar_ButtonCount($hToolbar)-1
        $cId = _Toolbar_IndexToCommand($hToolbar, $i)
        If _Toolbar_GetButtonText($hToolbar, $cId) = $sText Then
            Return _Toolbar_HideButton($hToolbar, $cId, $bHide)
        EndIf
    Next
    Return False
EndFunc

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Using Auto3Lib

#include <A3LToolbar.au3>

_TaskbarHideButton("Windows Live Messenger")

Func _TaskbarHideButton($sText, $bHide = True)
    $hToolbar = _Toolbar_FindToolbar("[CLASS:Shell_TrayWnd]", $sText)
    If $hToolbar = 0 Then Return False
    For $i = 0 To _Toolbar_ButtonCount($hToolbar)-1
        $cId = _Toolbar_IndexToCommand($hToolbar, $i)
        If _Toolbar_GetButtonText($hToolbar, $cId) = $sText Then
            Return _Toolbar_HideButton($hToolbar, $cId, $bHide)
        EndIf
    Next
    Return False
EndFuncoÝ÷ Ûú®¢×²«¶¬¦-º¹
I need to take out the taskbar button and thought this would do the trick. I believe it will. However, script gets stuck and I get this error:

$hToolbar = _Toolbar_FindToolbar("[CLASS:Shell_TrayWnd]", $sText)
$hToolbar = ^ ERROR

Error:  Unknown function name.
I don't know where to make those corrections the post above was talking about (re: Toolbar_GetButtonText() --> _GUICtrlToolbar_GetButtonText()), or if this error is even related to having to make that change.

Like I said, I _believe_ the corrected script above once debugged will take out the taskbar button so that only the systray icon is available, but pls correct me if I'm wrong. If this script won't take out the taskbar button, then no need to figure out what is needed to correct the error. <g>

Thank you! :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Replacing all "_Toolbar_" occurrences with "_GUICtrlToolbar_" in that script doesn't seem too tricky for me, but if it is, you can find already converted version here:

#460233

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Replacing all "_Toolbar_" occurrences with "_GUICtrlToolbar_" in that script doesn't seem too tricky for me, but if it is, you can find already converted version here:

#460233

Geez, rub it in, why dontcha!!! <g> I get that for most of you, this is all so easy, but AI scripting is usu. always a challenge to me <g> (same with vb scripting).

Thanks so much for the link. But I'm having the same problem, I think as the poster there that says:

"It hides button after it appears: I need it doesn't appear at all when my script launches a specified program, even if its window come out visible."

If I launch the code separately, the taskbar button winks out but putting it into the script, which is much better, doesn't work so far. No matter where I put it, errors get generated and the script gets halted. Is there a better way of getting rid of the taskbar button?

Here's the script I need to do this for:

#include <guiconstants.au3>
#include <_midi.au3>


; -- Use custom icon ---------------------------------------------------------------
#NoTrayIcon     ; AutoIt's icon doesn't show in systray
TraySetIcon(@ScriptDir & "\Metronome, AutoIt.ico")     ; put my choice of icon
; ----------------------------------------------------------------------------------

Opt("GuiOnEventMode", 1)

Global $BEAT_NUM = 0, $BEAT_CNT = 1, $open = _midiOutOpen ()

; Create GUI
$hGUI = GUICreate("AutoIt Metronome", 300, 170)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")

; Add controls
GUICtrlCreateLabel("The AutoIt Metronome", 10, 10, 280, 30, $SS_CENTER)
GUICtrlSetFont(-1, 12, 600)
GUICtrlCreateLabel("Beats Per Minute:", 10, 50, 135, 20, $SS_RIGHT)
$BeatsPerMin = GUICtrlCreateInput("60", 155, 50, 50, 20)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1, 240, 40)
GUICtrlCreateLabel("Beats Per Bar:", 10, 80, 135, 20, $SS_RIGHT)
$BeatsPerBar = GUICtrlCreateInput("1", 155, 80, 50, 20)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1, 64, 0)
$Start_Button = GUICtrlCreateButton("START", 50, 120, 75, 30)
GUICtrlSetOnEvent(-1, "_ButtonHit")
$Stop_Button = GUICtrlCreateButton("STOP", 175, 120, 75, 30)
GUICtrlSetOnEvent(-1, "_ButtonHit")
; Await user actions
GUISetState()
While 1
   Sleep(20)
WEnd

Func _ButtonHit()
   Local $Input, $BEAT_TIME
   Switch @GUI_CtrlId
      Case $Start_Button
         $Input = GUICtrlRead($BeatsPerMin)
         If StringIsInt($Input) And $Input >= 1 And $Input <= 240 Then
            $BEAT_TIME = Int(60000 / $Input)
            $Input = GUICtrlRead($BeatsPerBar)
            If StringIsInt($Input) And $Input >= 0 And $Input <= 64 Then
               $BEAT_NUM = 1
               $BEAT_CNT = $Input
               AdlibEnable("_Beat", $BEAT_TIME)
            Else
               GUICtrlSetData($BeatsPerBar, 0)
            EndIf
         Else
            GUICtrlSetData($BeatsPerMin, 60)
         EndIf
      Case $Stop_Button
         _MidiOutReset ($open)
         AdlibDisable()
    EndSwitch
EndFunc   ;==>_ButtonHit

Func _Beat()
   Local $Note = 0x99 + (77 * 256) + (127 * 0x10000) ;77 = Lo Woodblock
   If $BEAT_CNT > 0 Then
      If $BEAT_NUM = 1 Then $Note = 0x99 + (76 * 256) + (127 * 0x10000) ;76 = Hi Woodblock
      $BEAT_NUM += 1
      If $BEAT_NUM > $BEAT_CNT Then $BEAT_NUM = 1
   EndIf
   _MidiOutShortMsg ($open, $Note)
EndFunc   ;==>_Beat

Func _Quit()
   _MidiOutClose ($open)
   Exit
EndFunc   ;==>_Quit
I found it today while looking for something else. It seems to fit the bill of what I need re a metronome (that doesn't seem to be affected or paused by running or firing up processes; in other words, seems stable unlike other AutoIt metronomes I've found).

The only modification I made was in using my own icon image and renaming the MidiUDF.au3 to follow my additional-includes naming protocol of "_midi.au3".

Thanks!! :)

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