Iraj Posted February 12, 2022 Posted February 12, 2022 (edited) Hi Team, Greetings! I need to embed traytip in some autoit code where I dont need highlighted unwanted content & also can I have a custom logo instead of the presets. Thanks! #include <TrayConstants.au3> TrayTip("TrayTip Title", "TrayTip Content", 2, $TIP_ICONASTERISK) Edited February 12, 2022 by Iraj
Nine Posted February 12, 2022 Posted February 12, 2022 (edited) Your png is not available...But I believe this is what you are looking for : #NoTrayIcon #include <APIShellExConstants.au3> #include <WinAPIShellEx.au3> Opt("MustDeclareVars", True) Local $tNOTIFYICONDATA = DllStructCreate($tagNOTIFYICONDATA_V4) OnAutoItExitRegister(OnAutoItExit) DllStructSetData($tNOTIFYICONDATA, 'Size', DllStructGetSize($tNOTIFYICONDATA)) DllStructSetData($tNOTIFYICONDATA, 'hWnd', WinGetHandle(AutoItWinGetTitle())) DllStructSetData($tNOTIFYICONDATA, 'Flags', $NIF_ICON + $NIF_TIP) $tNOTIFYICONDATA.tip = "Test" $tNOTIFYICONDATA.Version = 4 DllStructSetData($tNOTIFYICONDATA, 'ID', 2) DllStructSetData($tNOTIFYICONDATA, 'hIcon', _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 166, 16, 16)) _WinAPI_ShellNotifyIcon($NIM_ADD, $tNOTIFYICONDATA) Sleep(5000) DllStructSetData($tNOTIFYICONDATA, 'Flags', $NIF_INFO) $tNOTIFYICONDATA.Info = "Info 256 bytes" $tNOTIFYICONDATA.InfoTitle = "Info title 64 bytes" $tNOTIFYICONDATA.InfoFlags = $NIIF_USER ; user icon DllStructSetData($tNOTIFYICONDATA, 'hBalloonIcon', _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 130, 16, 16)) _WinAPI_ShellNotifyIcon($NIM_MODIFY, $tNOTIFYICONDATA) Sleep (10000) Func OnAutoItExit() DllStructSetData($tNOTIFYICONDATA, 'ID', 2) _WinAPI_ShellNotifyIcon($NIM_DELETE, $tNOTIFYICONDATA) EndFunc ;==>OnAutoItExit Edited February 12, 2022 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now