Jump to content

Recommended Posts

Posted (edited)

Change the own tray icon is easy but how to change the tray icon of another process ?

Searched help, forums and google but no sucess. Can someone point me to UDFs or sanple scripts.

I have written a small helper for AVIRA virus solution and I want to change the tray icon so that the user recognices that a scan or update is running.

I know the PID of the tray process, but the code snippet to change or blink or whatsoever ... is missing. :)

Please do not code for me but send some pointers or ideas.

The coding will be my problem. :o

Edited by TinyBoy
Posted

Change the own tray icon is easy but how to change the tray icon of another process ?

Searched help, forums and google but no sucess. Can someone point me to UDFs or sanple scripts.

I have written a small helper for AVIRA virus solution and I want to change the tray icon so that the user recognices that a scan or update is running.

I know the PID of the tray process, but the code snippet to change or blink or whatsoever ... is missing. :)

Please do not code for me but send some pointers or ideas.

The coding will be my problem. :o

:D

me too :D

Posted (edited)

@gwertzui3

I cant say better than you for help him :o one word : :)

Edit : try reshacker for change Icon

Cheers, FireFox.

Edited by FireFox
Posted

The items in the system tray are just buttons on a toolbar. Try _GUICtrlToolbar_SetButtonBitMap(). The images available come from the Image List for the toolbar. See the help file under the _GuiCtrlToolBar_* functions.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

The items in the system tray are just buttons on a toolbar. Try _GUICtrlToolbar_SetButtonBitMap(). The images available come from the Image List for the toolbar. See the help file under the _GuiCtrlToolBar_* functions.

:)

Thanks PsaltyDS :o

Here my solution:

CODE
; hide/show tray icon

#include <GuiToolbar.au3>

Local $i, $iCmdID, $sText

Local $handle = ControlGetHandle("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32; INSTANCE:1]")

Local $iButtonCount = _GUICtrlToolbar_ButtonCount($handle)

For $i = 1 To $iButtonCount

$iCmdID = _GUICtrlToolbar_IndexToCommand($handle, $i)

$sText = _GUICtrlToolbar_GetButtonText($handle, $iCmdID)

If StringInStr($sText, "Avira AntiVir") Then ExitLoop

Next

For $i = 1 To 5

_GUICtrlToolbar_HideButton($handle, $iCmdID, True)

Sleep(500)

_GUICtrlToolbar_HideButton($handle, $iCmdID, False)

Sleep(500)

Next

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