S3cret91

Notifications UDF - Desktop notifications 1.2 (updated Mai 1st)

13 posts in this topic




Really nice S3cret91, the end product is really polished.

Thanks, it might be useful!

Share this post


Link to post
Share on other sites

It's very nice, well done!

I'll don't have a use for it (for now) but I'll keep it in my snippets dir.

Thanks!

Share this post


Link to post
Share on other sites

S3cret91,

Very nice.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

@S3cret91

Nice UDF.

Welcome to the forum

 

btw.
I'm not sure but I think you are the first member with more likes then post (or at least I do not know any more) ;)

 

 

Edited by mLipok

Wondering who uses AutoIT and what it can be used for ?


ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:

Spoiler

Last update: 2017-03-27
Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities *

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

 

Share this post


Link to post
Share on other sites

Thank you.

One thing that I forgot to mention:

In the german AutoIt forum one member had issues with the animation being laggy in the example scripts (and me too for a short period of time, but not anymore). If anyone encounters this issue, please say it. And if someone has an explanation why this may happens: I'm open for advice :)

 

 

1 hour ago, mLipok said:

I'm not sure but I think you are the first member with more likes then post (or at least I do not know any more) ;)

Thats the plan :D

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Helly friends of cool notifications. Got an update for everyone who is interested in some new stuff.

  • Windows 10: Notifications will be colored as your taskbar by default. Change the taskbar color in windows settings and try it out.
  • Windows 8/8.1: Notifications will be colored as the border color of your active window or if this kind of design is deactivated then black (as it was before)
  • Windows 7 and earlier: Black notifications as before (sry but aero design is uncool)

Big thanks to @nend for figuring that out. Check out his thread here.

Also:

  • Notifications will fade out if animationTime > 0
  • Call own functions when a notification is clicked (see _Notifications_Create parameters and the advanced example)
  • Set own notification sounds using _Notifications_SetSound (mp3 or wav)
  • Close all notifications using _Notifications_CloseAll

 

And there is 1 change:

_Notifications_SetTextColor is now named _Notifications_SetColor because it does not only change the text color but also border + seperating line.

 

I also updated the examples, the GUIMsg and OnEvent example are now simplier and reduced to what matters. The advanced example shows what can be done using the Set-Functions.

 

Have fun, please gimme feedback if you notice bugs.

 

Edited by S3cret91

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I've tested and it was allready good and now it's perfect, very nice UDF.

Edit:

Is it possible to set cursor if hovered over the close label/button of the notifications window?

If no maybe it's a nice function to build in this UDF?

Edited by nend

Share this post


Link to post
Share on other sites

#10 ·  Posted

15 minutes ago, S3cret91 said:

You mean that the mouse gets the icon as if the mouse is hovered over a button?

I could do that I guess.

I mean the same as the command "GUICtrlSetCursor" does.

So if the cursor hovered over the label/button it thange into whatever cursor you set.

Share this post


Link to post
Share on other sites

#11 ·  Posted

I won't upload a new version right now, so everyone interested pls add it for yourself for now:

1. Enter this line in line 281:

GUICtrlSetCursor(-1, 0)

 

2. Replace lines 250 and 251 with this:

If $__callFunction <> "" Then   
        $__notificationList[$__notificationCount][4] = GUICtrlCreateLabel("", 0, 0, $__notificationWidth, $__closingButtonTop - 1)
        GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
        GUICtrlSetCursor(-1, 0)
    EndIf

 

1 person likes this

Share this post


Link to post
Share on other sites

#12 ·  Posted

3 hours ago, S3cret91 said:

I won't upload a new version right now, so everyone interested pls add it for yourself for now:

1. Enter this line in line 281:

GUICtrlSetCursor(-1, 0)

 

2. Replace lines 250 and 251 with this:

If $__callFunction <> "" Then   
        $__notificationList[$__notificationCount][4] = GUICtrlCreateLabel("", 0, 0, $__notificationWidth, $__closingButtonTop - 1)
        GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
        GUICtrlSetCursor(-1, 0)
    EndIf

 

Insert the lines and it work perfect, thanks.

Share this post


Link to post
Share on other sites

#13 ·  Posted

Looks beautiful

 

Share this post


Link to post
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

  • Similar Content

    • Simpel
      By Simpel
      Hi,
      I read the forum rules and the passage "interacting with this website", too. I'm not completely sure whether it would be ok to read out my count of notifications by script (there is no automated login) as I do on a private forum where I am the webmaster. There I once in a minute read out unread posts like this:
      #include <inet.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> Local $iTreffer = "" Local $sPause $hGUI = GUICreate('Ungelesen', 55, 20, @DesktopWidth - 166, 0, $WS_POPUP + $WS_BORDER, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) $hDragLabel = GUICtrlCreateLabel("", 0, 0, 20, 20, -1, $GUI_WS_EX_PARENTDRAG) $hIcon = GUICtrlCreateIcon("shell32.dll", 7, 2, 2, 16, 16) $hTreffer = GUICtrlCreateLabel($iTreffer, 20, 0, 35, 20,$SS_CENTER) GUICtrlSetFont(-1,14) GUISetState(@SW_SHOW) Auslesen_Treffer() GUICtrlSetData($hTreffer, $iTreffer) While 1 $sJetzt = TimerDiff($sPause) If $sJetzt > 60000 Then Auslesen_Treffer() GUICtrlSetData($hTreffer, $iTreffer) EndIf Sleep(100) $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Auslesen_Treffer() $sPause = TimerInit() $source = _INetGetSource("https://xxx.yyyy.de/search.php?search_id=unreadposts") ; your forum here If @error Then $iTreffer = "" Return EndIf $sTreffer = StringRegExp($source, "Die Suche ergab \d*? Treffer", 1) If $sTreffer = "0" Then $iTreffer ="" Return EndIf $sTrimTreffer = StringTrimLeft($sTreffer[0],16) $iTreffer = Number(StringTrimRight($sTrimTreffer, 8)) EndFunc Is it allowed to catch the count of notifications from autoitscript.com that way? I always log in personally by website.
      As I looked into the html source code of autoitscript.com I couldn't find something like the count of notifications. Where could I find it?
      If my post is against the rules, I apologize, and I would delete the post immediatly.
      Regards, Conrad
    • kcvinu
      By kcvinu
      Hi all,
      For last few weeks, i am in search of some good articles about windows messages and notifications. I am reading Charles Petzold's Windows Programming 5th edition in google books. Since the prize of that book costs nearly my two day's wages, i am depending google books. Then i wandered a lot of websites for gathering articles. Atlast i found a tool on MSDN site. Name is Control Spy. At first i thought that it is like the WindowInfo tool in AutoIt. But no, it is an incredible tool for a develepor. We can learn more about the behaviour of window controls and their messages and notifications. 
      This is the link
      https://www.microsoft.com/en-us/download/details.aspx?id=4635
      After installation, go to the directory and there is a word document. Read and learn more about how a windows control behaves. 
       

    • dieterhatn
      By dieterhatn
      Hello there!
      I've recently updated to Windows 10 and saw that new and beatiful info center for notifications.
      A lot of applications already support it, so I'm curious if I can get my autoit script to use the windows native notification system.
      Any help is much appreciated
      Thanks in advance
    • mLipok
      By mLipok
      Is there any possibility how to make the notification features such as: sorting, grouping, filtering   e.g. sort by date, name, thread, a notification type grouping by date, name, thread, a notification type filtering, only one date, a name, a thread, a notification type       I think it would help many members manage the information coming every day.
    • mLipok
      By mLipok
      I read many threads.
      I follow to many of them.
      Very often I have that problem.
      I open Notification / VIew All Notifications
      Browser open in new tab - Saved Notifications - a list.
      So I click right mouse button and selecting "Open in new tab"
      And here I expect it will get a specific page that is relevant topic. Well, it happens. But why did not always open the page is not open to the right post? For example, if I have 10 responses to a post I want to open the first answer. So I click on the first visit, and in the meantime opened last.