Jump to content

hide/show a given systray icon


Recommended Posts

Hi!

Please, is there a way to hide a given icon (not all icons!) in the windows systray ? If not, did you know a command line tools to do that or an API function to call...

Thinks for all help

Do a search in Scripts and Scraps for SysTray_UDF.au3 by Tuape.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

hi !

I just write a script to hide/delete a given icon program in systray but there is a bug here is my code and a log file

My code: (please if you are able to compile it without error, please send me the compiled)

#include "SysTray_UDF.au3"

Opt("TrayIconHide", 1)

$index=_SysTrayIconIndex($CmdLine[1]) ; $CmdLine[1] is the process name (ExeName)

_SysTrayIconVisible($CmdLine[2], $index); $CmdLine[2] are 1=hide or 0 show

--------------------------------------Log-----------------------------------------------------------------

D:\Program Files\AutoIt3\Include\SysTray_UDF.au3(71,35) : ERROR: HWnd(): undefined function.

If $info[$i] = HWnd($var[$j][1])

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

D:\Program Files\AutoIt3\Include\SysTray_UDF.au3(229,35) : ERROR: DllStructCreate(): undefined function.

$TBBUTTON = DllStructCreate($str)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

D:\Program Files\AutoIt3\Include\SysTray_UDF.au3(246,27) : ERROR: DllStructDelete(): undefined function.

DllStructDelete($TBBUTTON)

~~~~~~~~~~~~~~~~~~~~~~~~~^

D:\Program Files\AutoIt3\Include\SysTray_UDF.au3(274,127) : ERROR: DllStructGetSize(): undefined function.

$lpData = DLLCall("kernel32.dll","ptr","VirtualAllocEx", "int", $procHandle[0], "int", 0, "int", DllStructGetSize ( $TBBUTTON )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~^

D:\Program Files\AutoIt3\Include\SysTray_UDF.au3(284,129) : ERROR: DllStructGetPtr(): undefined function.

DllCall('kernel32.dll', 'int', 'ReadProcessMemory', 'int', $procHandle[0], 'int', $lpData[0], 'ptr', DllStructGetPtr($TBBUTTON2)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~^

D:\Program Files\AutoIt3\Include\SysTray_UDF.au3(285,113) : ERROR: DllStructGetData(): undefined function.

DllCall('kernel32.dll', 'int', 'ReadProcessMemory', 'int', $procHandle[0], 'int', DllStructGetData($TBBUTTON2,6)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~^

E:\systray.au3 - 6 error(s), 0 warning(s)

>AU3Check Ended with Error(s).

>Exit code: 0 Time: 0.320

Edited by supergg02
Link to comment
Share on other sites

Are you running the Release version or the Beta version. I think that you need the Beta version for SysTray_UDF.au3. Also change the include line to #include <SysTray_UDF.au3>


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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