NetTalk Central

Author Topic: Using NetAuto Chat example to send notifications  (Read 2786 times)

mtabakin

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Using NetAuto Chat example to send notifications
« on: May 07, 2015, 07:37:53 PM »
I'm using the NetAuto "Chat" example to send notifications (sys tray popups on the receiving computers using WinEvent) from a NTWS NetWebForms procedure. Pretty much "cloned" the Chat example but I needed the process to be totally automatic as opposed to pressing the Send button as in the Chat example. The only way I could get it to automatically send the notification (packet) was to put a Timer on the window which is hidden by the way, and in the Time event do the following:

fosNotify.Send()               fosNotify is the object name of course
POST(Event:closewindow)

This all works but am I going about this in the right way using the timer or is there a better way? Attached is the procedure that I created (with much help from the Chat example!!!)

[attachment deleted by admin]
« Last Edit: May 07, 2015, 07:48:32 PM by mtabakin »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11192
    • View Profile
Re: Using NetAuto Chat example to send notifications
« Reply #1 on: May 08, 2015, 12:09:18 AM »
Hi Mike,

A timer event is just an event.
I'm not sure what the "trigger" is, but you could post an event:accepted to the button, or just do an event:user when the window opens, or anything like that, and then just send the message when that event happens. Same as a timer really, but you don't have to wait for the timer to elapse...

cheers
Bruce