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


Links to reference documents:
1 - http://forums.livecode.com/viewtopic.php?t=31278
2 - https://quality.livecode.com/show_bug.cgi?id=20762
3 - http://livecode.wikia.com/wiki/StatusIcon
4 - http://www.sonsothunder.com/products/ststray/ststray.htm
5 - https://ss64.com/vb/appactivate.html
6 - https://forums.livecode.com/viewtopic.php?t=16652


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to