It is currently December 11th, 2018, 2:40 pm

Windows Notification Toaster

Post your work-in-progress and completed skins to share and discuss.
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Windows Notification Toaster

kyriakos876 » November 7th, 2018, 7:19 pm

khanhas wrote:
November 7th, 2018, 6:07 pm
So make a function, probably is similar as EncodeVar, that null-check Rainmeter variable then return `<action ...></action>` code block as string if variable is available. Else returns a blank string or $null

Then use it in $ToastTemplate:

Code: Select all


...
<actions>
    <action content="$ButtonNameVar" arguments="$ButtonActionVar" activationType="protocol"/>
    $Button2
    $Button3
</actions>
Yes, I will try that hoping that it won't return an error. (some other stuff is to be consider but I think this can work)
khanhas wrote:
November 7th, 2018, 6:22 pm
About Listener API you posted earlier, you actually can use it Powershell:

Code: Select all

[Windows.UI.Notifications.Management.UserNotificationListener, Windows.UI.Notifications, ContentType = WindowsRuntime]

$listener = [Windows.UI.Notifications.Management.UserNotificationListener]::Current
$accessStatus = $listener.GetAccessStatus()

switch($accessStatus)
{
  "Allowed" { 
    $RmAPI.Log("Yay! Proceed as normal") 
  }
  "Denied" {
    $RmAPI.Log("Access denied")
  }
  "Unspecified" {
    $RmAPI.Log("Do something, idk")
  }
}
For some reason no matter what, this returns "Yay! Proceed as normal" even if I manually deny the permission... It could be something that I missed in Microsoft's documentation, I will take a closer look into it.

Again, thank you very much. I appreciate it!
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Windows Notification Toaster

kyriakos876 » November 7th, 2018, 10:44 pm

Made some changes and updated the first post. :welcome:

Give me all your feedbacks!! :x
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Windows Notification Toaster

kyriakos876 » November 8th, 2018, 4:58 pm

Fixed the issue where you had to refresh after adding/removing a button or adding/removing the progress bar.

Get version 8.11.2018.2 in the first post. :welcome: