Windows notifications

Bob Sneidar bobsneidar at iotecdigital.com
Thu Feb 7 17:32:55 EST 2019


Create a standalone with socket communications and send commands to it to show, hide and anything else you need the stack to do. The real trick is to build it so that it doesn't show up in the taskbar, else people will close it. When your app opens, launch the executable with the stack hidden. Then pass calls via socket to your stack as I mentioned. I did this once and it worked quite well, except that I didn't know then how to prevent an app from appearing in the task bar or the MacOS Dock. 

Bob S


> On Feb 7, 2019, at 12:32 , Andrew Bell via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> I am trying to modify a Windows stack to alert the user when a particular event happens while the app is in the background or minimized. Something like mergNotify, but for Windows, would be ideal.
> 
> My first thought was to change the taskbar icon, like Outlook does when I have a new email or Skype does to display my status. The forum and dictionary proved "set the icon to (some ID)" doesn't work on Windows[1], but I could use the still-undocumented "set the statusIcon to (some ID)" property[2] to change the system tray icon.
> 
> This sort of worked as I was able to make a little repeat loop that changed the statusIcon[3] from one image to another and then back again to create an attention grabbing area at the bottom of the screen. My problem with this is that after the first time that alert is acknowledged, via statusIconDoubleClick in this case, any subsequent statusIcon changes are only displayed in the "Show hidden icons" of the system tray which in essence buries it from the users view (until the stack is relaunched). I confirmed this behavior with the Sons of Thunder product STSTray[4] which seems to suffer from the same problem.
> 
> Can anyone suggest a LiveCode native way to alert a Windows user? The closest I could find is to use "do as VBScript" with an AppActivate command[5], but was hoping for something using LC script directly (although this forced me to learn some VBScript and use the "do as alternateLanguage" command[6] which were both foreign to me).
> 
> put "Set objShell = CreateObject(" & QUOTE & "Wscript.Shell" & QUOTE & ")" into tScript
> put RETURN & "objShell.AppActivate" && QUOTE & "taskbar_icon_demo" & QUOTE after tScript
> do tScript as "VBScript"
> 
> 
> --Andrew Bell





More information about the use-livecode mailing list