How to Display a Custom Message in Windows 10 “Notification/Alert” Slide-Out Box on the right side of the Screen

202 views
Skip to first unread message

cw noway

unread,
Oct 15, 2023, 8:07:30 PM10/15/23
to AutoControl

How to Display a Custom Message in Windows 10 “Notification/Alert” Slide-Out Box on the right side of the Screen

 

 

In Windows 10, whenever a Chrome extension is disabled, enabled, or updated, or Windows 10 has updated it’s OS or apps, or a System Restart is required, etc., Windows will notify you by revealing a “Notification” box (in a slide-out fashion)  from the right side of the screen (see attached pic below).

 

 

ISSUE:

 

I want to mimic that same behavior, on demand, but, with my own custom messages (text).  Is there a way to send text to that Notification box, and have the box display itself on demand using AC?  I don’t know how the “Chrome Extensions” accomplish this task, but I want to do the same thing if at all possible.

 

 

Any assistance would be greatly appreciated,

 

Thanks in advance


How to send text to Windows 10 Slide-out Notification box.png

How to send text to Windows 10 Slide-out Notification box.png

AutoControl support

unread,
Oct 15, 2023, 10:48:16 PM10/15/23
to AutoControl
AutoControl's scripting API doesn't provide that functionality, but it's possible to achieve the same using the ACtl.runCommand() function to invoke a PowerShell script.
let title = "Notification title" let content = "Notification content" await ACtl.runCommand(`powershell -executionpolicy bypass -File .\\showNotif.ps1 "${title}" "${content}"`)
On your desktop, create a file named "showNotif.ps1" with the following content:

[void] [reflection.assembly]::loadwithpartialname("System.Windows.Forms") $notif = new-object System.Windows.Forms.NotifyIcon $notif.icon = [System.Drawing.SystemIcons]::Information $notif.visible = $true $notif.showballoontip(10, $args[0], $args[1], "Info")

cw noway

unread,
Oct 16, 2023, 12:19:04 AM10/16/23
to AutoControl
Excellent.  It works great.  Thank you very much.
Reply all
Reply to author
Forward
0 new messages