Jump to content

Hide 1 Program from taskbar


Recommended Posts

Hi, I'm looking for method that permit me to run and use a program

but hiding its name in the taskbar and only its name and maintain all other name of program that

already exists or new name of program that I will start in next time.

I have read guide with commadn @SW_hide ... command "control show" but i have lots problem to understand how do this.

Searching on forum I found this program:

===========================================================================================================

Dim $WinArray = ''

HotKeySet('{PGDN}', 'HideTaskBarWindows')

HotKeySet('{PGUP}', 'UnHideTaskBarWindows')

While 1

Sleep(0x7FFFFFFF)

WEnd

Func HideTaskBarWindows()

$WinArray = ''

Local $winlistx = WinList()

For $winlistxi = 1 to $winlistx[0][0]

If ControlCommand($winlistx[$winlistxi][0], '', '', 'IsVisible', '') And Not StringInStr($winlistx[$winlistxi][0], 'Program Manager') Then $WinArray = $WinArray & $winlistx[$winlistxi][0] & Chr(01)

Next

$WinArray = StringSplit(StringTrimRight($WinArray, 1), Chr(01))

For $i = 1 To UBound($WinArray) - 1

ControlHide($WinArray[$i], '', '')

Next

EndFunc

Func UnHideTaskBarWindows()

For $i = 1 To UBound($WinArray) - 1

ControlShow($WinArray[$i], '', '')

Next

EndFunc

===========================================================================================================

...but this hide all, when I press PagDown also GUI of program and I can't use it.

This Don't make what I'm looking for.

For Example I want that AutoIT starts PowerDVD and automatically hide the name "POWERDVD" in taskbar

for all time that I'm using it. PowerDVD GUI with all option must be accessible, only TAskbar must be hide.

When I close powerDVD AutoIT exit.

I must use this function to hide my VirtualBox Machine in order to use it on background without taskbar space use.

Someone can help me please?

Link to comment
Share on other sites

Please have a look at the example for ObjCreateInterface. It uses the ITaskbarList interface to hide Notepad from the taskbar.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

I have prove example with notepad linked from you and runs.

I have replace name "notepad" with "calc" or yje name of program that I start and I want to hide from taskbar

but example stops to run correctly and name are showed on taskbar.

Where I'm wronging?

I'm beginner, if you can explain with easy words I thanks to you.

Link to comment
Share on other sites

Excuse me but if is only one the program that i want hide in taskbar and I know its name

there is an other method more easy to create the script that do this.

I have readed the link posted but is too difficult for me,

the command is

"DeleteTab($hwnd)"

and the program's name that i run is VirtualBox.exe

I can't do

"DeleteTab("VirtualBox.exe")" ??

help me please.

Link to comment
Share on other sites

The window has a name and a class. Convert it to a handle with WinGetHandle:

$oTaskbarList.DeleteTab(WinGetHandle("Title of Window"))

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Thank you very much.

All OK!! :-))))

#NoTrayIcon

Local Const $sCLSID_TaskbarList = "{56FDF344-FD6D-11D0-958A-006097C9A090}"

Local Const $sIID_ITaskbarList = "{56FDF342-FD6D-11D0-958A-006097C9A090}"

Local Const $sTagITaskbarList = "HrInit hresult(); AddTab hresult(hwnd); DeleteTab hresult(hwnd); ActivateTab hresult(hwnd); SetActiveAlt hresult(hwnd);"

Local $oTaskbarList = ObjCreateInterface($sCLSID_TaskbarList, $sIID_ITaskbarList, $sTagITaskbarList)

$oTaskbarList.HrInit()

Run("c:VirtualBox.exe")

WinWait("Oracle")

$oTaskbarList.DeleteTab(WinGetHandle("Oracle"))

All run now, adding the variables inserted in the example showed on Manual of AutoIT. :-)

Do you know if there is possibility also to hide a single SystemTray icon ?

I'm using program: StartDock ObjctDock 2.0 and it creates an icon in systemTray and it has not

option to remove it from program.

I found On WEB forum that different users have tried to remove icon but nothing to do.

Maybe that they haven't thinked to use script (if AutoIT permits this).

I want see always all Windows Tray icon except systemTray created from ObjectDock.

I don't want click mouse button on systemTray to see icon loaded, I want all always visibile on screen.

For this reason I have choosed on Control Panel to show always all icon but I want hide ObjectDock icon

AutoIT permit this ???

Thanks again for help.

Link to comment
Share on other sites

Maybe the SysTray UDFs can help

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

From link posted I have downloaded _SysTray.au3 and i have readed examples and proved.

I have included 2 process and this file au3.

In the AutoIT guide i don't find nothing searching SysTray icon

I see all script examples but there are lots variables :

$pid, $name, $title and I'm crazying to try to understand how implement them.

I am not a programmer but if you can help me with more details i commit oneself and i try again

#include <_SysTray.au3>

#include <Process.au3>

#include <WinAPI.au3>

$handle = _SysTrayIconHandle("ObjectDock")

$title = WinGetTitle($handle)

$pid = WinGetProcess($handle)

$name = _ProcessGetName($pid)

...I am lost in the sea... :-(

is too difficult for me, create Au3 string to delete the only one systray icon of ObjectDock that i don't want to see in that area.

I want delete only this icon, there is not one command as you have posted me for taskbar:

"$oTaskbarList.DeleteTab(WinGetHandle("VirtualBox"))" ??

thanks

Ps: I can conitue post using this thread or i must create new topic ?

This Topic start with taskbar problem: "SOLVED" and now I ask help for systray with same request to hide icon. What can I do ? Thanks again

Edited by apollo13
Link to comment
Share on other sites

Hi, with difficutly reading lots other examples and different UDFs commands i have found and

adapted for me this script.

It runs but don't make the exact effect that i'm searching.

This script hide the systray icon of ObjectDock (as i want) but the space used from icon is always used

from blank space.

I need that icon is hide (as script do) and there is no blank space resulted from different systray icons

after run this script. :-(

Please give me some suggestion. Please Help me, if you can, to understand how remove also blank space created. Thanks

#NoTrayIcon

#Include <GuiToolBar.au3>

Run("C:Program FilesUtentePersonalizzazioneObjectDockObjectDock.exe")

sleep (500)

Opt("WinTitleMatchMode", 4)

Global $hTray = WinGetHandle("[CLASS:Shell_TrayWnd]")

Global $hToolbar = ControlGetHandle($hTray, "", "[CLASSNN:ToolbarWindow321]")

Global $iCnt = _GUICtrlToolbar_ButtonCount($hToolbar)

ConsoleWrite("Debug: $iCnt = " & $iCnt & @LF)

Global $iCmdObjectDock = -1

Global $sMsg, $sText, $iCmd

For $n = 0 To $iCnt - 1

$sMsg = "Index: " & $n

$iCmd = _GUICtrlToolbar_IndexToCommand($hToolbar, $n)

$sMsg &= " CommandID: " & $iCmd

$sText = _GUICtrlToolbar_GetButtonText($hToolbar, $iCmd)

If StringInStr($sText, "ObjectDock Plus") Then $iCmdObjectDock = $iCmd

$sMsg &= " Text: " & $sText

ConsoleWrite("Debug: " & $sMsg & @LF)

Next

ConsoleWrite("Debug: $iCmdObjectDock = " & $iCmdObjectDock & @LF)

_GUICtrlToolbar_SetButtonState($hToolbar, $iCmdObjectDock, $TBSTATE_HIDDEN)

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...