Sign in to follow this  
Followers 0
supergg02

hide/show a given systray icon

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

thinks a lot BigDod ! ;) you are very active and helpfull (merci)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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>



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

SysTray_UDF.au3 is not working on Win 2000 Pro, at least for me.

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