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: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>
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.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") } }
Again, thank you very much. I appreciate it!