Search the Community
Showing results for tags 'Notification'.
Found 4 results
Sers, while working on another project I was in need of desktop notifications. I wanted an own implementation and from time to time the code grew and I thought about sharing it with the world. I know that there is a similar UDF out there but when my project got bigger an UDF was the best choice for me. As you can see the UDF's differ in usage and style of notifications. So, what do we have? The UDF offers the usage of permanent desktop notifications for your own script in a very easy way. Notifications are starting in the bottom right corner of your main screen and will be shown on top until there is no more space. Further notifications will be shown if previous ones are closed. The notifications have a nice minimalistic design in two colors. By default they match the look of the dark taskbar in Windows 10, but colors and other things can be set differently if wished (see example scripts). The UDF works for GUIOnEventMode activated and deactivated and detects it automatically. Show me! Each notification has its GUI, a title, the message, a seperating line, date label, time label and a closing button (and if activated, a border around the notification). The color of the title, message, seperating line, date, time and closing button (+ border if activated) have all the text color. Right now notifications have a fixed size. I thought about variable sizes but did not add it because I didn't need it so far. Some people may notice the shorter seperating line when border is activated, thats just because of better looks Notifications will be colored as the following: Windows 10: they match the design of the taskbar Windows 8/8.1: On most designs: they match the border color of active windows, else they are black with transparency (see screenshot) Windows 7 and earlier: black with transparency (sry aero) How do I use notifications in my script? include UDF call _Notifications_Startup() (after you determined if you want to use GUIOnEventMode or not) If GUIOneventMode deactivated: call _Notifications_CheckGUIMsg($__GUIMsg) in your main loop create a notification using _Notifications_Create($__title, $__message) Between step 2 and 3 you can set various options: _Notifications_SetAnimationTime _Notifications_SetBorder _Notifications_SetButtonText _Notifications_SetBkColor _Notifications_SetColor _Notifications_SetDateFormat _Notifications_SetSound _Notifications_SetTextAlign _Notifications_SetTimeFormat _Notifications_SetTransparency You can also set own functions to be called when notifications are clicked (see advanced example). And now? You can find more information in the UDF. There also are two example scripts to show the usage for GUIOnEventMode activated and deactivated. Another advanced example shows the usage of the Set-Functions. Thats it? Yup, have fun. Changelog Notifications.au3 ( v1.2) Notifications GUIMsg Example.au3 Notifications OnEvent Example.au3 Notifications Advanced Example.au3
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,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
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
Creeper v0.1.1 Creeper is a 'heads up display' notification window that appears at the bottom of the screen and moves to the top and fades away. It is a window that is semi-transparent, and transparent to clicks. Creeper is not a UDF, but rather a stand-alone script to be invoked from the command line or another script. Many notifications can be launched this way in succession without complications. Pressing right ctrl and left ctrl will remove all notifications from the screen at any time. Creeper uses an embedded IE object and is thereby capable of rich html-based notifications. The html framework provided consists of: An optional title An optional image An optional html body (any html you want) The content parameters are: title html image Full styling for the framework involves parameters: bordercolor, borderwidth, borderstyle, padding, width backgroundcolor, color font, fontsize titlefont, titlecolor imagewidth, imageheight Special parameters are: fmtini fmtname outhtml autodel Specifying Command Line Parameters Specification is made easy by using named parameters, so the command line parameters can look like: "name1[,name2]..." "<value for name1>" "<value for name2>" Parameters for a simple message could look like: "title,html" "My Title" "Some html with <b>markup</b>" To make this even easier, a formatting ini file can be referenced, and parameter values picked up from there: "title,html,fmtini,fmtname" "My Title" "Some html with <b>markup</b>" "C:some.ini" "sectionname" Even more, a registry key can be used for all parameters: "2013.07.28.14.37.12.722" Templating is also supported, so if you have a html value that looks like: Hi, my name is %(name) ...then your command line can look like: "fmtini,fmtname,title,$name" "C:some.ini" "sectionname" "My Title" "George" where the html value in this case is picked up from the ini The other great feature of Creeper is that it can log its messages to a specific point in any html file: "html,outhtml" "Log this html" "C:some.html" Next Steps Examine the code comment header. The file will run without parameters using internal defaults. Let me know if you have any issues or have any solutions to the issues given. Caveats Its v0.1, so read the issues in the comments. The functions do not have thorough documentation headers since this is not a UDF, but the functions are simple and have single line explanations. Also, not a lot of error handling going on at this stage History Edit - Update to v0.1.1 TestCreeper.au3