Deye Posted June 2, 2017 Posted June 2, 2017 Thanks Melba, Had to go out for a couple of hours, will get back to this as soon as i return
Deye Posted June 2, 2017 Posted June 2, 2017 Great, it Works now Here is how I used it, including a fix for the notification placement for the desktop screen which sometimes overlaps the clock area For $i = 1 To $aEDM[0][0] $hDisplay = $aEDM[$i][0] ; 1 for first handle, 2 for second $tRect = _WinAPI_GetMonitorInfo($hDisplay) If @error Then Return SetError(3, 0, 0) $aCoords[$i][0] = DllStructGetData($tRect[1], 'Left') $aCoords[$i][1] = DllStructGetData($tRect[1], 'Top') $aCoords[$i][2] = DllStructGetData($tRect[1], 'Right') $aCoords[$i][3] = DllStructGetData($tRect[1], 'Bottom') ;Edit < < < < < < < < < < < < < < < < < < < < < < < < < > If _WinAPI_MonitorFromWindow('', $MONITOR_DEFAULTTOPRIMARY) = $aEDM[$i][0] Then If Not _IsTaskbarHidden() Then ;https://www.autoitscript.com/wiki/Snippets_(_Windows_Information_) Local $shellWinRect = WinGetClientSize(_WinAPI_GetShellWindow()) If $shellWinRect[1] = $aCoords[$i][3] Then Local $aTaskbar_Hight = WinGetClientSize("[Class:Shell_TrayWnd]") $aCoords[$i][3] -= $aTaskbar_Hight[1] EndIf EndIf EndIf If $aEDM[$i][0] = _WinAPI_MonitorFromWindow(WinGetHandle("My Title", "")) Then $iIndex = $i $iForceMonitor = $i EndIf Next
Moderators Melba23 Posted June 2, 2017 Author Moderators Posted June 2, 2017 Deye, Delighted to hear it. I will release a new version of the UDF this weekend. M23 Skysnake and Deye 2 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
Moderators Melba23 Posted June 4, 2017 Author Moderators Posted June 4, 2017 [NEW VERSION] - 4 Jun 17 Added: _Notify_Locate now takes an optional second parameter which, when used in a multiple monitor setup, will force the notifications to appear on a specified monitor rather than the left and right side of the entire display area. New UDF in the first post. M23 Skysnake and mLipok 2 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
Moderators Melba23 Posted August 2, 2018 Author Moderators Posted August 2, 2018 [NEW VERSION] - 2 Aug 18 Added: When specifying the icon to use, if the $vIcon parameter is set to the name of an ico or exe file, the main icon within will be displayed, but if a trailing "|" followed by the icon index is added to the name, that icon from within the file is used New UDF and examples in the zip in the first post. 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
User751139 Posted January 16, 2019 Posted January 16, 2019 @Melba23 Fantastic script i'm still using it to this day to run many tasks. Is there a way to make the texts on the boxes into clickable URLs? Thanks!
Moderators Melba23 Posted January 17, 2019 Author Moderators Posted January 17, 2019 User751139, Sorry for the delay in replying - local internet outage. Glad you like the UDF. But at first glance I cannot see any easy way to get clickable links into the notifications - but I will think more about it over the weekend. M23 User751139 1 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
Moderators Melba23 Posted January 21, 2019 Author Moderators Posted January 21, 2019 (edited) User751139, I could not get an actual link in the notification - but I have managed to code a pseudo-link (simply underlined the message) and written a new function to tell the user just how a notification was retracted. Take a look at this beta code and example and let me know what you think. And of course comments from anyone else also welcome. M23 Edited June 10, 2020 by Melba23 Beta code removed 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
Moderators Melba23 Posted January 24, 2019 Author Moderators Posted January 24, 2019 (edited) User751139, More testing has shown that the above script is not as reliable as I would like in detecting clicks on the actual text of the message rather then the whitespace around it. So I have simplified the code to limit the retraction detection function to simply return "timeout / title clicked / message clicked": I will probably use this version as the basis for a release - does it help you at all? M23 Edited June 10, 2020 by Melba23 Beta code removed 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
Moderators Melba23 Posted April 20, 2019 Author Moderators Posted April 20, 2019 (edited) Hi, AndroidZero started another thread asking how to read the content of a clicked notification. Here is some Beta code which has this facility along with the title/message clicked functionality from the posts above: UDF: Example script: Let me know if it is of use to anyone, particularly AndroidZero! M23 Edited May 10, 2020 by Melba23 Beta code removed AndroidZero 1 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
AndroidZero Posted April 21, 2019 Posted April 21, 2019 You forgot to store the message & title content of a notification that expired on timeout, well at least i missed it for my needs. Added following Line in Notify_Mod_TextRet.au3 (Script Line 887) Func __Notify_Timer() ... $g_aNotify_Data[0][9] = GUICtrlRead($g_aNotify_Data[$i][8]) & Opt("GUIDataSeparatorChar") & GUICtrlRead($g_aNotify_Data[$i][9]) .. I added a few functions from my current project to your example and it works like a charm for me ! expandcollapse popup#include "Notify_Mod_TextRet.au3" #include <MSSQL.au3> Opt("TrayAutoPause", 0) ; Press ESC to exit script HotKeySet("{ESC}", "_Exit") Global $samAccName = @UserName, _ $SQL_SERVER = "192.168.10.28", _ $SQL_USER = "devZero", _ $SQL_PW = "xxxxxxxxx", _ $SQL_DB = "kmp" ; Register message for click event _Notify_RegMsg() ; Set notification location _Notify_Locate(0) ; Show notifications Global $aNotCID[5] $aNotCID[0] = _Notify_Show(0, "Ticket 1", "Message 1") $aNotCID[1] = _Notify_Show(0, "Ticket 2", "Message 2") $aNotCID[2] = _Notify_Show(0, "Ticket 3", "Message 3") $aNotCID[3] = _Notify_Show(0, "Message - Andreas", "This is a test message click to answere") $aNotCID[4] = _Notify_Show(0, "Status", "SQL Server [online]", 1) While 1 Sleep(10) ;~ Opt("GUIDataSeparatorChar") For $i = 0 To 4 Local $sRet = _Notify_RetractCheck($aNotCID[$i]) Local $reason = $sRet[0] If $reason <> 0 Then Local $title = StringSplit($sRet[1],"|",1)[1] Local $msg = StringSplit($sRet[1],"|",1)[2] Local $timestamp = @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC EndIf If $reason == 0 Then ;===== nothing ==== ElseIf $reason == 1 Then ConsoleWrite(@CRLF & "========= $aNotCID[" & $i & "] =========") ConsoleWrite(@CRLF & "RetractCheck: Clicked Title") ConsoleWrite(@CRLF & "Title: " & $title) ConsoleWrite(@CRLF & "Message: " & $msg) ;~ Local $mscon = _MSSQL_Con($SQL_SERVER, $SQL_USER, $SQL_PW, $SQL_DB) ;~ _MSSQL_Query($mscon, "INSERT INTO ticketlog (samAccName, notifyRetract, notifyTitle, notifyMessage, timeStamp) " & _ ;~ "VALUES ('" & $samAccName & "','" & $title & "','" & $msg & "','" & $timestamp & "')") If StringInStr($title,"Message", 1) Then $msgFrom = StringSplit($title," - ", 1)[2] _UDP_Messenger("Popup", "ChatWindow", $msgFrom) ElseIf StringInStr($title,"Ticket", 1) Then $ticketNr = StringSplit($title," ", 1)[2] _Ticket_Window("Edit", $ticketNr, Default, Default) EndIf ElseIf $reason == 2 Then ConsoleWrite(@CRLF & "========= $aNotCID[" & $i & "] =========") ConsoleWrite(@CRLF & "RetractCheck: Clicked Message") ConsoleWrite(@CRLF & "Title: " & $title) ConsoleWrite(@CRLF & "Message: " & $msg) ;~ Local $mscon = _MSSQL_Con($SQL_SERVER, $SQL_USER, $SQL_PW, $SQL_DB) ;~ _MSSQL_Query($mscon, "INSERT INTO ticketlog (samAccName, notifyRetract, notifyTitle, notifyMessage, timeStamp) " & _ ;~ "VALUES ('" & $samAccName & "','" & $title & "','" & $msg & "','" & $timestamp & "')") If StringInStr($title,"Message", 1) Then $msgFrom = StringSplit($title," - ", 1)[2] _UDP_Messenger("Popup", "ChatWindow", $msgFrom) ElseIf StringInStr($title,"Ticket", 1) Then $ticketNr = StringSplit($title," ", 1)[2] _Ticket_Window("Edit", $ticketNr, Default, Default) EndIf ElseIf $reason == 9 Then ConsoleWrite(@CRLF & "========= $aNotCID[" & $i & "] =========") ConsoleWrite(@CRLF & "RetractCheck: Timeout") ConsoleWrite(@CRLF & "Title: " & $title) ConsoleWrite(@CRLF & "Message: " & $msg) ;~ Local $mscon = _MSSQL_Con($SQL_SERVER, $SQL_USER, $SQL_PW, $SQL_DB) ;~ _MSSQL_Query($mscon, "INSERT INTO ticketlog (samAccName, notifyRetract, notifyTitle, notifyMessage, timeStamp) " & _ ;~ "VALUES ('" & $samAccName & "','" & $title & "','" & $msg & "','" & $timestamp & "')") ;~ _MSSQL_End($mscon) EndIf Next WEnd Func _Exit() Exit EndFunc Func _UDP_Messenger($mode, $window, $from) ; too big to show EndFunc Func _Ticket_Window($mode, $index, $styleLV, $styleGrid) ; too big to show EndFunc Really love your Notify UDF and since the last change it even more comfortable. Also I got a lot of ideas how to make it more customizeable and what new features could be usefull #GDI+ Animation. I will share the modified notify UDF when all tests are finished until then keep up your excellent work 💪
Moderators Melba23 Posted April 21, 2019 Author Moderators Posted April 21, 2019 AndroidZero, I did wonder whether to add the content to a timeout retraction - as you found out it is not difficult to do, so I will add that for the next release. Glad you find the new functionality useful. 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
Moderators Melba23 Posted April 26, 2019 Author Moderators Posted April 26, 2019 [NEW VERSION] - 26 Apr 19 Added: _Notify_RetractCheck allows the user to determine the retraction method (title clicked/message clicked/timeout) and content (title/message) of the last retracted notification. New UDF and additional example in the zip in the first post. M23 mLipok and argumentum 1 1 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
Phil1991 Posted June 6, 2019 Posted June 6, 2019 I want to display a message on two lines, but when I change this variable, the notification is larger, but the message is not displayed correctly. Do you have any idea how to proceed? original Local $iNotify_Height = 40 after modif Local $iNotify_Height = 80 ex code: _Notify_Show(@AutoItExe, "Exemple", "Line 1 " & @CRLF & " Line 2", 0, 0) Thank you
Moderators Melba23 Posted June 7, 2019 Author Moderators Posted June 7, 2019 Phil1991, Welcome to the AutoIt forums. Not only do you need to increase the height of the notification, you need to increase the height of the label in which the message is displayed. As you have not done this and as you are displaying a title, the message label remains sized for a single line. If you really need 2 lines of message text then I suggest not using a title - which automatically gives you the possibility of a 2-line message. As I have often stated, the idea of these notifications is to enable short messages to be passed to the user - and the limited size allows as many as possible to fit onto the screen. As for previous requests to make the notifications larger I am not prepared amend the code to allow this as it seems to me to be counter to the basic idea behind the UDF. If you insist on displaying longer messages, might I point you at my Toast and ExtMsgBox UDFs which do allow for much larger messages - and also for rather more user interaction. M23 Phil1991 1 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
Phil1991 Posted June 10, 2019 Posted June 10, 2019 (edited) OK Thanks Melba23!! I will go see your other 2 UDFs. They maybe better suited to my needs in this case. Edit: Your Toast Udf wil probably solve my problem Edited June 10, 2019 by Phil1991 Update
AndreyS Posted December 2, 2019 Posted December 2, 2019 Melba23, thanks for showing another of your apparently interesting UDF. But I tried all the examples already and did not see a single notice. When starting and working examples, no errors occur. Tell me, what am I doing wrong? Maybe something needs to be pressed at the same time or some actions to be performed? Autoit: 3.3.14.2 OS: Windows 8.1
Moderators Melba23 Posted December 2, 2019 Author Moderators Posted December 2, 2019 AndreyS, The examples work for me in Win 7 and Win 10, so I do not see why they should not in Win 8. You should see the various notifications extend from the side of the screen - do you have a multiple monitor setup by any chance? 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
Andrei_V Posted March 30, 2021 Posted March 30, 2021 The Notify.au3 script is awesome! Not only it answers my search for posting notifications in AutoIt, but looking at the code I learned A LOT! Thank you so much!
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