Kiti Posted June 15, 2008 Share Posted June 15, 2008 (edited) Is it possibe to click the traytip and make something happen? Exactly like when you start Windows and a tip appears saying "Your computer might be at risk - Automatic Updates is turned off - Click this balloon to fix this problem." And when you click the baloon the Security Center pops up. Can AutoIt do such thing? Like: TraySetOnEvent($TRAY_EVENT_TIPCLICK,"SpecialEvent") Func SpecialEvent() Select Case @TRAY_ID = $TRAY_EVENT_TIPCLICK ;do something here!! EndSelect EndFunc Edited June 15, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Kiti Posted June 15, 2008 Author Share Posted June 15, 2008 Can this be done, or AutoIt does not support it? Please tell me. Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
CrewXp Posted February 27, 2009 Share Posted February 27, 2009 *bumpity bump* Current Project invokes this method. I've been tinkering with alternative methods, but I'm thinkin to do this, I'm going to have to include an outside library. True? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 27, 2009 Moderators Share Posted February 27, 2009 CrewXp, I have done something like this, but I used "Toast" type windows rather then a ToolTip. That way you create the GUI and can easily react when it is clicked. If you are interested I could look up the old code and see if I can get a small example working to show you. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
CrewXp Posted February 27, 2009 Share Posted February 27, 2009 CrewXp,I have done something like this, but I used "Toast" type windows rather then a ToolTip. That way you create the GUI and can easily react when it is clicked. If you are interested I could look up the old code and see if I can get a small example working to show you.M23Hey Melba. Wow, Perfect! Yea, actually... if I'm thinking of the same 'Toast' that you're thinking of.. I just posted a TOPIC regarding Trillians/Msn's 'Toast' like pop-up they do. That example would be awesome if you can find it! It's exactly what I need to get past this hump in my agenda. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 27, 2009 Moderators Share Posted February 27, 2009 CrewXp, I thought you might want it, so I went looking! This example is set up for a taskbar at the bottom of the screen:expandcollapse popup#include <WindowsConstants.au3> #Include <WinAPI.au3> ; Create Toast window Global $hGUI = GUICreate("", 200, 100, @DesktopWidth - 210, @DesktopHeight - 130, $WS_POPUPWINDOW, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) Global $hLabel = GUICtrlCreateLabel("Click to close", 1, 1, 198, 198) ; Slide in Toast - but keep focus on current window _WinAnimate($hGUI, 0x00040008) $hCurrWnd = _WinAPI_GetForegroundWindow() GUISetState(@SW_SHOW, $hGUI) WinActivate($hCurrWnd, "") ; Wait for click from Toast While 1 Local $aMsg = GUIGetMsg(1) If $aMsg[1] = $hGUI And $aMsg[0] = $hLabel Then ExitLoop WEnd ; Slide out window _WinAnimate($hGUI, 0x00050004) Exit ; -------------- ; Gary Frost's WinAnimate function Func _WinAnimate($h_gui, $i_mode, $i_duration = 1000) If @OSVersion = "WIN_XP" OR @OSVersion = "WIN_2000" Or @OSVersion = "WIN_VISTA" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $h_gui, "int", $i_duration, "long", $i_mode) Local $ai_gle = DllCall('kernel32.dll', 'int', 'GetLastError') If $ai_gle[0] <> 0 Then Return SetError(1, 0, 0) EndIf Return 1 Else Return SetError(2, 0, 0) EndIf EndFunc;==> _WinAnimate() Hope it does what you need. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
CrewXp Posted February 27, 2009 Share Posted February 27, 2009 CrewXp, I thought you might want it, so I went looking! This example is set up for a taskbar at the bottom of the screen:expandcollapse popup#include <WindowsConstants.au3> #Include <WinAPI.au3> ; Create Toast window Global $hGUI = GUICreate("", 200, 100, @DesktopWidth - 210, @DesktopHeight - 130, $WS_POPUPWINDOW, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) Global $hLabel = GUICtrlCreateLabel("Click to close", 1, 1, 198, 198) ; Slide in Toast - but keep focus on current window _WinAnimate($hGUI, 0x00040008) $hCurrWnd = _WinAPI_GetForegroundWindow() GUISetState(@SW_SHOW, $hGUI) WinActivate($hCurrWnd, "") ; Wait for click from Toast While 1 Local $aMsg = GUIGetMsg(1) If $aMsg[1] = $hGUI And $aMsg[0] = $hLabel Then ExitLoop WEnd ; Slide out window _WinAnimate($hGUI, 0x00050004) Exit ; -------------- ; Gary Frost's WinAnimate function Func _WinAnimate($h_gui, $i_mode, $i_duration = 1000) If @OSVersion = "WIN_XP" OR @OSVersion = "WIN_2000" Or @OSVersion = "WIN_VISTA" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $h_gui, "int", $i_duration, "long", $i_mode) Local $ai_gle = DllCall('kernel32.dll', 'int', 'GetLastError') If $ai_gle[0] <> 0 Then Return SetError(1, 0, 0) EndIf Return 1 Else Return SetError(2, 0, 0) EndIf EndFunc;==> _WinAnimate() Hope it does what you need. M23... yes!! omg thanks Melba. I ran the example and well, it worked awesome!! I'll touch it up on the graphics side, but that's EXACTLY what I was looking for! I thought it would be jaggy when it was animating up, but it actually ran very smooth. Thanks a lot! I'm sure others will find it very handy too. Life Saver! 5am... been working on this for hours, can finally sleep now till my 11am class. So thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 27, 2009 Moderators Share Posted February 27, 2009 CrewXp, If you like the example, go and look at this thread where you will find a much more comprehensive Toast function. No-one seemed interested in it at the time - perhaps you might be now? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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