GregoryAM Posted February 18 Share Posted February 18 Hello everyone! I'm new to the AutoIT Forum, but have been using AutoIT for a few years now. I've finally gotten around to TrayTips, which I love the idea they're like Windows Notifications (at least on Win10) see attached photo, it didn't let me insert it as a link from Imgur for some reason... But, I've been attempting to get the TrayTip to have an onClick action. I've inserted a Global variable in front of it, and called it within the TrayGetMsg() switch and within the GUIGetMsg() switch, but still nothing happens. I've managed to make sure the TrayMenu items (not in code snippet) work within the TrayGetMsg() Switch, which I thought that might help with making the TrayTip work. But, after hours of looking into forum posts, I haven't been able to find anything useful and some of the code doesn't work, or it's more complicated than it possibly should be. Here's a code snippet: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <TrayConstants.au3> Opt("TrayMenuMode", 1) Global $GUI = GUICreate("GUI TITLE", 431, 213, -1, -1) Global $trayTip = TrayTip("AUTOIT Notification", "This is line 1" & @CRLF & "This is line 2", 10) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $trayTip MsgBox(0, "Notification Clicked!", " You've Clicked on the Notification!", 5) EndSwitch Switch TrayGetMsg() Case $trayTip MsgBox(0, "Notification Clicked!", " You've Clicked on the Notification!", 5) EndSwitch WEnd Is there something I'm missing? or is TrayTip's really not clickable / don't allow actions to be performed from a click? Also, if this is in the wrong category, please move it to the correct one. I wasn't sure where I should post it. Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now