By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

Hide AutoIt icon from tray

How to hide the AutoIt script icon from the systray properly.

Created: 2013-10-29 15:03

Hiding the systray icon, usually in the bottom right corner of the screen, can be done by using the AutoItSetOption command, this will however not remove the icon from the initial launch of your program – the icon will still be shown for around 750 milliseconds. To remove the icon from the tray entirely, you can use #NoTrayIcon somewhere in the top of your source code. I.e.


; The rest of your code goes below this comment

When to use which feature

The #NoTrayIcon feature can be used when you want to not show the icon at all, while you can use the options method to show the icon after either hiding it trough AutoItSetOption or not showing it with #NoTrayIcon. I.e.

MsgBox(4096, "Click OK", "Show icon in systray for 10 seconds.")
Opt("TrayIconHide", 0) ; Show tray icon

An option value of 1 will hide the icon, wheres a value of 0 will show the icon.