We have a script that a few users run daily. It runs continuously and checks for records to appear in a database every few minutes. Then it alerts the user with the Display command and plays a wav file, so they can take action.

The script works exactly as designed, but now they are asking if there is a way that it can alert them without interrupting the active window (while they are typing). For example, in the way that Outlook pops up a "new e-mail" alert without changing the active window.

Does WinBatch have the ability to do this directly, or via some creative coding?

We have a script that a few users run daily. It runs continuously and checks for records to appear in a database every few minutes. Then it alerts the user with the Display command and plays a wav file, so they can take action.

The script works exactly as designed, but now they are asking if there is a way that it can alert them without interrupting the active window (while they are typing). For example, in the way that Outlook pops up a "new e-mail" alert without changing the active window.

Does WinBatch have the ability to do this directly, or via some creative coding?

In other words, you need something to display but not also take the input focus. Unfortunately, WinBatch's IntControl 1007 does not provide popup notification functionality when running from the system tray. There is no direct support for "toast" message at this time either. I suppose you could use IntControl 1007 to change the icon of the notification tray icon to something that a user might notice and hope the user notices it.

Windows's action center has been made available to native desktop applications as of Windows 10. I guess Windows 10 is getting long enough in the tooth to consider adding something to WinBatch.

I believe there are one or two examples of using Win32 API's with DllCall to create popup windows someplace in the Tech Database but I don't recall if they handle the focus issue.

Logged

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight." - Dr. Tom Cade