Jump to content

Getting Message from Notification - Notify.au3


Recommended Posts

I want to use a modified WM_MOUSEACTIVATE when clicking on a Notificaion instead the _Notify_RegMsg().
My goal: I want read the message of the clicked Notification and start another function depending on the message
In the Notifiy UDF I could find in Line 683 that the Message is stored in $aNotify_Data[$aNotify_Data[0][0]][9] but it shows only a number anyone here knows wher I can find the stored notification message ?

Func WM_MOUSEACTIVATE($hWnd, $iMsg, $wParam, $lParam)

    #forceref $iMsg, $wParam, $lParam

ConsoleWrite(@CRLF & "$hWnd=" & $hWnd)

    For $i = $aNotify_Data[0][0] To 1 Step -1
        ; Is it a click on a notification?
        If $hWnd = $aNotify_Data[$i][0] Then
            ; Check if other action occuring
            If $bNotify_Action Then
                ; Clear click on this notification
                AdlibRegister("_Notify_ResetClick", 100)
            Else
                $aNotify_Data[0][5] = $i
                If $aNotify_Data[$i][5] Then
                    ; Extend the notification
                    AdlibRegister("_Notify_Extend", 100)
                Else
                    ; Delete the notification if clickable
                    If $aNotify_Data[$i][3] Then
                        ConsoleWrite(@CRLF & "$aNotify_Data[0][0]= " & $aNotify_Data[0][0])
                        ConsoleWrite(@CRLF & "$aNotify_Data[0][1]= " & $aNotify_Data[0][1])
                        ConsoleWrite(@CRLF & "$aNotify_Data[0][2]= " & $aNotify_Data[0][2])
                        ConsoleWrite(@CRLF & "$aNotify_Data[0][3]= " & $aNotify_Data[0][3])
                        ConsoleWrite(@CRLF & "$aNotify_Data[0][4]= " & $aNotify_Data[0][4])
                        ConsoleWrite(@CRLF & "$aNotify_Data[0][5]= " & $aNotify_Data[0][5])
                        ConsoleWrite(@CRLF & "$aNotify_Data[0][6]= " & $aNotify_Data[0][6])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][1]= " & $aNotify_Data[$i][1])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][2]= " & $aNotify_Data[$i][2])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][3]= " & $aNotify_Data[$i][3])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][4]= " & $aNotify_Data[$i][4])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][5]= " & $aNotify_Data[$i][5])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][6]= " & $aNotify_Data[$i][6])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][7]= " & $aNotify_Data[$i][7])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][8]= " & $aNotify_Data[$i][8])
                        ConsoleWrite(@CRLF & "$aNotify_Data[$i][9]= " & $aNotify_Data[$i][9])

                        ConsoleWrite(@CRLF & "$aNotify_Data[$aNotify_Data[0][0]][9]= " & $aNotify_Data[$aNotify_Data[0][0]][9])
                        AdlibRegister("_Notify_Delete", 100)
                    EndIf
                EndIf
            EndIf
            ExitLoop

        EndIf
    Next

    Return "GUI_RUNDEFMSG"
EndFunc

image.png.e18fbc2629185537021a21e33ce72f4b.pngimage.png.2d4a53437eafbce490cc9ff499b31434.png

Link to comment
Share on other sites

  • Moderators

AndroidZero,

As the question was specific to the Notify UDF, why did you not post in the UDF thread where I am more likely to see it?

Anyway, if you do go to the thread, you will see I have a new Beta which should help you get what you want without fiddling in the INTERNAL_USE_ONLY functions.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...