Page 2 of 2
					
				Re: how to send a message to the windows notification center?
				Posted: Sun May 02, 2021 4:02 pm
				by JHPJHP
				Hi ChrisR,
Thanks again for testing the examples.
Added the example I spoke about 
here, and included a simple Image2Base64 script.
In addition, I made a small change to the SetExecutionPolicy Procedure, adding -Scope CurrentUser; updated all examples.
 
			 
			
					
				Re: how to send a message to the windows notification center?
				Posted: Sun May 02, 2021 8:16 pm
				by A.D.
				JHPJHP, Thanks for your example. Is it possible to show the toast just in the center?
			 
			
					
				Re: how to send a message to the windows notification center?
				Posted: Sun May 02, 2021 8:52 pm
				by JHPJHP
				Hi A.D.
Yes; updated 
Windows Services & Other Stuff\Other_Stuff\PowerShell\ToastNotification\ToastNotification_2.pb
Replace:
Code: Select all
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("PureBasic").Show($xmlToast)
With:
Code: Select all
$toast = [Windows.UI.Notifications.ToastNotification]::new($xmlToast)
$toast.Tag = "PureBasic"
$toast.Group = "PureBasic"
$toast.ExpirationTime = [DateTimeOffset]::Now.AddMinutes(5)
$toast.SuppressPopup = $true
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("PureBasic").Show($toast)
 
			 
			
					
				Re: how to send a message to the windows notification center?
				Posted: Sun May 02, 2021 9:17 pm
				by A.D.
				very nice  

, didn't know what Powershell can do. I was thinking of writing a DLL in C# for PureBasic instead of using the powershell but the truth is, i'm not able to write in C# (yeah, i'm getting old!). Thanks!
 
			 
			
					
				Re: how to send a message to the windows notification center?
				Posted: Mon Mar 04, 2024 5:17 am
				by novablue
				Is there no winapi command to trigger a windows notification? I don't want to enable scripting or use powershell. There has to be a better way of doing this?
			 
			
					
				Re: how to send a message to the windows notification center?
				Posted: Mon Mar 04, 2024 6:58 am
				by BarryG