Jump to content

Search the Community

Showing results for tags 'notification'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 6 results

  1. TrayTipGUI.au3 is a custom GUI to send a message to the tray from other script ... and can accept multiple messages which remain on the screen without the script waiting for the shown time can also use any icon from an external file or internally from registered libraries TrayTipGUI.au3 ;https://www.autoitscript.com/forum/topic/209408-traytipgui-to-send-a-message-to-the-tray/ #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 ;TrayTipGUI.au3 ; custom GUI to send a message to the tray #NoTrayIcon #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <WinAPIProc.au3> #include <WinAPISys.au3> Local $MinY Local $iParams = $CmdLine[0] If Not $iParams Then ; examle if no parameters Local $iParams[5] = [4, " * This is an example...", _ "This means that you have run the " & @CRLF _ & " --> " & @ScriptName & " <-- " & @CRLF & @CRLF _ & " without command line parameters." & @CRLF _ & " and for this reason act as demo.", 10, 2061] Else $iParams = $CmdLine EndIf TrayTipGUI($iParams[1], $iParams[2], $iParams[3], $iParams[4]) Exit Func TrayTipGUI($Title, $Msg, $Timeout = 5, $Icon = 0) ;Colors for the TrayMsg GUI. 0x14171b; 0xFFFFFF; 0xBBBBBB; Local $BackColor = 0x14171b, $TitleColor = 0xFFFFFF, $MsgColor = 0xBBBBBB ;Get DeskTop size Local $DTs = WinGetPos("[CLASS:Shell_TrayWnd]") ConsoleWrite("X=" & $DTs[0] & " Y=" & $DTs[1] & " W=" & $DTs[2] & " H=" & $DTs[3] & @CRLF) ; X=0 Y=1040 W=1920 H=40 * <--- main value $MinY = $DTs[1] ;get the cnt of @TrayTipGUI Local $WinCnt = GetTrayCnt() + 1 ConsoleWrite("$WinCnt=" & $WinCnt & @CRLF) ;GUI ;~ Local $hGUI = GUICreate("@TrayTipGUI", 450, 150, @DesktopWidth - 460, @DesktopHeight, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) Local $hGUI = GUICreate("@TrayTipGUI", 450, 150, $DTs[2] - 460, $DTs[1] + $DTs[3], $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUISetBkColor($BackColor) WinSetTrans($hGUI, "", 245) ; * <-- transparency seting range 0 - 255 ;Exit button Local $idExit = GUICtrlCreateButton("X", 427, 3, 20, 20) GUICtrlSetFont(-1, 10, 800, 0, "Arial") GUICtrlSetBkColor(-1, $BackColor) GUICtrlSetColor(-1, $TitleColor) ;Title GUICtrlCreateLabel($Title, 10, 10, 410, 35) GUICtrlSetFont(-1, 11, 600, 0, "Arial") GUICtrlSetColor(-1, $TitleColor) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;Msg Local $idMsg = GUICtrlCreateLabel($Msg, 80, 50, 360, 95) GUICtrlSetFont(-1, 11, 600, 0, "Arial") GUICtrlSetColor(-1, $MsgColor) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;~ ************ Icons Library ************************** ;~ C:\Windows\System32\imageres.dll $cnt = 334 --> 0000 ;~ C:\Windows\system32\shell32.dll $cnt = 329 --> 1000 ;~ C:\Windows\SysWOW64\wmploc.dll $cnt = 159 --> 2000 ;~ C:\Windows\System32\ddores.dll $cnt = 149 --> 3000 ;~ C:\Windows\System32\mmcndmgr.dll $cnt = 129 --> 4000 ;~ C:\Windows\system32\ieframe.dll $cnt = 103 --> 5000 ;~ C:\Windows\System32\compstui.dll $cnt = 101 --> 6000 ;~ C:\Windows\System32\setupapi.dll $cnt = 62 --> 7000 Switch $Icon Case 1 To 334 ; icon from C:\Windows\System32\imageres.dll $cnt = 334 GUICtrlCreateIcon("imageres.dll", $Icon * -1, 10, 43, 64, 64) Case 1001 To 1329 ; icon from C:\Windows\system32\shell32.dll $cnt = 329 $Icon -= 1000 GUICtrlCreateIcon("shell32.dll", $Icon * -1, 10, 43, 64, 64) Case 2001 To 2159 ; icon from C:\Windows\SysWOW64\wmploc.dll $cnt = 159 $Icon -= 2000 GUICtrlCreateIcon("wmploc.dll", $Icon * -1, 10, 43, 64, 64) Case 3001 To 3149 ; icon from C:\Windows\System32\ddores.dll $cnt = 149 $Icon -= 3000 GUICtrlCreateIcon("shell32.dll", $Icon * -1, 10, 43, 64, 64) Case 4001 To 4129 ; icon from C:\Windows\System32\mmcndmgr.dll $cnt = 129 $Icon -= 4000 GUICtrlCreateIcon("mmcndmgr.dll", $Icon * -1, 10, 43, 64, 64) Case 5001 To 5103 ; icon from C:\Windows\system32\ieframe.dll $cnt = 103 $Icon -= 5000 GUICtrlCreateIcon("ieframe.dll", $Icon * -1, 10, 43, 64, 64) Case 6001 To 6101 ; icon from C:\Windows\System32\compstui.dll $cnt = 101 $Icon -= 6000 GUICtrlCreateIcon("compstui.dll", $Icon * -1, 10, 43, 64, 64) Case 7001 To 7062 ; icon from C:\Windows\System32\setupapi.dll $cnt = 62 $Icon -= 7000 GUICtrlCreateIcon("setupapi.dll", $Icon * -1, 10, 43, 64, 64) Case Else Local $tmp = StringSplit($Icon, ",") If $tmp[0] = 1 Then ; single icon file If $tmp[1] = 0 Then ; if no icon maximize the msg GUICtrlSetPos($idMsg, 10, 48, 440, 97) ; 80, 50, 360, 90 Else ; single icon file GUICtrlCreateIcon($tmp[1], -1, 10, 43, 64, 64) EndIf ElseIf $tmp[0] = 2 Then ; if .dll file with icon index GUICtrlCreateIcon($tmp[1], $tmp[2] * -1, 10, 43, 64, 64) Else ; unknown situation MsgBox(0, "Else unknown situation", $Icon) EndIf EndSwitch GUISetState(@SW_SHOW, $hGUI) ;shows up the GUI Local $WPos = WinGetPos($hGUI) ;[0]=X; [1]=Y; [2]=Width; [3]=Height WinMove($hGUI, "", $WPos[0], $MinY - 150 - 10, $WPos[2], $WPos[3], 5) ; Begin the timer and store the handle Local $hTimer, $fDiff $hTimer = TimerInit() ;******************************************* Do ; Loop until the TimerDiff > $Timeout Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idExit ExitLoop EndSwitch Sleep(100) ;Find the difference in time from the previous call of TimerInit $fDiff = TimerDiff($hTimer) Until $fDiff > $Timeout * 1000 ;******************************************* ;disappear the GUI WinMove($hGUI, "", $WPos[0], @DesktopHeight, $WPos[2], $WPos[3], 5) ;Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>TrayTipGUI ;---------------------------------------------------------------------------------------- Func GetTrayCnt() ;get the cnt of @TrayTipGUI Local $aData = _WinAPI_EnumDesktopWindows(_WinAPI_GetThreadDesktop(_WinAPI_GetCurrentThreadId())) Local $WinTitle, $WCnt, $WinPos For $i = 1 To $aData[0][0] $WinTitle = WinGetTitle($aData[$i][0]) If $WinTitle = "@TrayTipGUI" Then $WinPos = WinGetPos($aData[$i][0]) If $WinPos[1] < $MinY Then $MinY = $WinPos[1] $WCnt += 1 EndIf Next Return $WCnt EndFunc ;==>GetTrayCnt ;---------------------------------------------------------------------------------------- Example1.au3 - Example for using TrayTipGUI ; https://www.autoitscript.com/forum/topic/209408-traytipgui-to-send-a-message-to-the-tray/ ;Example1.au3 - Example for using TrayTipGUI #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 Local $Str = "This is an Example for using " & @CRLF _ & "--> TrayTipGUI.au3" & @CRLF _ & "and come in screen like notification" Tip($Str, "This is an example...", 6, 2060) Sleep(4000) $Str = "and can accept multiple messages " & @CRLF _ & "which remain on the screen" & @CRLF _ & "without the script waiting" & @CRLF _ & "for the shown time " Tip($Str, "This is another one example...", 7, '"shell32.dll", 236') ; with icon file Sleep(5000) $Str = "can also use any icon" & @CRLF _ & " from an external file" & @CRLF _ & "or internally from registered libraries" Tip($Str, "This is one more example...", 8, 1236) ; internal with 1236 Sleep(4000) Tip("This is the body " _ & "of the mesage " _ & "with multiline concatenation example", _ "This is the title ...", 8, 228) Sleep(5000) Tip("AutoIt v3 is a freeware BASIC-like scripting language " _ & "designed for automating the Windows GUI and general scripting. " _ & "It uses a combination of simulated keystrokes, " _ & "mouse movement and window control manipulation " _ & "in order to automate tasks in a way not possible " _ & "or reliable with other languages e.g. VBScript and SendKeys ", _ "This is an Example without icon for maximize the mesage area", 15, 0) ;---------------------------------------------------------------------------------------- Func Tip($Msg, $Title = "info", $Timeout = 3, $Icon = 2060) Local $FilePath = @ScriptDir & "\TrayTipGUI.au3" Local $Param = '"' & $Title & '" "' & $Msg & '" "' & $Timeout & '" "' & $Icon & '"' Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName($FilePath) & " " & $Param) EndFunc ;==>Tip ;---------------------------------------------------------------------------------------- Example2.au3 - Example for using TrayTipGUI ; https://www.autoitscript.com/forum/topic/209408-traytipgui-to-send-a-message-to-the-tray/ ;Example2.au3 - Example for using TrayTipGUI #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 Tip("so You can present the messages easy" & @CRLF & " without title") Sleep(3000) Tip("as you see It is more efficient to write") Sleep(3000) Tip("in the sense that you don't need an icon and a title every time") Sleep(4000) Tip("Of course, if you need them, you can put them on", "New Title...", 5, 2132) Sleep(4000) ;---------------------------------------------------------------------------------------- Func Tip($Msg, $Title = "info", $Timeout = 3, $Icon = 2060) Local $FilePath = @ScriptDir & "\TrayTipGUI.au3" Local $Param = '"' & $Title & '" "' & $Msg & '" "' & $Timeout & '" "' & $Icon & '"' Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName($FilePath) & " " & $Param) EndFunc ;==>Tip ;---------------------------------------------------------------------------------------- [optional] Make_icon_katalog.au3 - Make_icon_katalog create 9 X *.jpg files with icons from the dll libraries as albums for easy using in TrayTipGUI.au3 ;https://www.autoitscript.com/forum/topic/209408-traytipgui-to-send-a-message-to-the-tray/ #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 ;Make_icon_katalog.au3 ; creating icons albums from the dll libraries #include <StaticConstants.au3> #include <ScreenCapture.au3> ;Icons Library Local $Ldll = "C:\Windows\System32\imageres.dll" ;$cnt = 334 --> 0000 $Ldll &= ";C:\Windows\system32\shell32.dll" ;$cnt = 329 --> 1000 $Ldll &= ";C:\Windows\SysWOW64\wmploc.dll" ;$cnt = 159 --> 2000 $Ldll &= ";C:\Windows\System32\ddores.dll" ;$cnt = 149 --> 3000 $Ldll &= ";C:\Windows\System32\mmcndmgr.dll" ;$cnt = 129 --> 4000 $Ldll &= ";C:\Windows\system32\ieframe.dll" ;$cnt = 103 --> 5000 $Ldll &= ";C:\Windows\System32\compstui.dll" ;$cnt = 101 --> 6000 $Ldll &= ";C:\Windows\System32\setupapi.dll" ;$cnt = 62 --> 7000 $Ldll = StringSplit($Ldll, ";") For $x = 1 To $Ldll[0] ConsoleWrite($Ldll[$x] & @CRLF) Example($Ldll[$x], $x) Next ShellExecute(@ScriptDir) Exit Func Example($IconLib, $Libfactor) $Libfactor = ($Libfactor - 1) * 1000 Local $cnt = _WinAPI_ExtractIconEx($IconLib, -1, 0, 0, 0) ConsoleWrite("$cnt = " & $cnt & @CRLF) Local $C, $Col, $R, $Row, $BtnSz = 48 $Col = (@DesktopWidth / 3 * 2) / $BtnSz $Row = Int($cnt / $Col) Local $hGUI = GUICreate($IconLib, $Col * $BtnSz + $BtnSz, $Row * $BtnSz, 0, 0, -1) Local $Icon[$cnt + 1] $Icon[0] = 0 Local $i = 1 For $R = 0 To $Row For $C = 0 To $Col ReDim $Icon[UBound($Icon) + 1] $Icon[$i] = GUICtrlCreateIcon($IconLib, -1 * $i, $C * $BtnSz, $R * $BtnSz, $BtnSz, $BtnSz) GUICtrlCreateLabel($i & " ", $C * $BtnSz, $R * $BtnSz, $BtnSz / 2, 12, $SS_RIGHT) ;GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetTip($Icon[$i], "index " & $i) $i += 1 Next Next GUISetState(@SW_SHOW) WinWaitActive($hGUI, "", 5) If $Libfactor = 0 Then $Libfactor = "0000" Local $WPos = WinGetPos($hGUI) ; [0]=X [1]=Y [2]=Width [3]=Height ; Capture region _ScreenCapture_Capture(@ScriptDir & "\" & $Libfactor & ".jpg", $WPos[0], $WPos[1], $WPos[2], $WPos[3]) GUIDelete($hGUI) EndFunc ;==>Example Please, leave your comments and experiences here.
  2. I am once again asking for your experienced assistance. If I open a website that uses notifications I am asked to allow or block them for that website after a few seconds. This notification pops up every time the page gets navigated to, even tho you have clicked on allow for several times. I am explicitly not searching for smth to get rid of "Chrome is being controlled by automated test sw". Instead I am searching for a line of script to disable all notifications by default: like here chrome://settings/content/notifications. This is code should give you an example of what notifications I am talking about: #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession, $sID _WD_Option("Driver", "C:\Program Files (x86)\AutoIt3\chromedriver.exe") _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://webradio.planetradio.de/") _WD_LoadWait($sSession)
  3. 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
  4. 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
  5. 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
  6. 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
×
×
  • Create New...