Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Broadcast message - how to?
Message
De
26/03/2003 13:48:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00770233
Message ID:
00770373
Vues:
16
There are a few options. If everytime a user starts your app, you capture the workstation OS, the network domain or tree, the login name, and the machine name, you can then determine which method to use to send the message. For instance, for all of those users whose records show the OS as Windows 2000, you capture the machine name and issue 'net send' to them. I have code I got here on the UT that will help you with that. If they are logged into a Novell server and do not have Windows 2000 (net send will work for those novell windows 2000 users also), then to those users they will receive the novell broadcast message or send message command. Do you have any users that are not logged into a Novell server, on a Windows 2000 domain or have Windows 2000 as their workstation OS? Windows 95/98 users not on Novell could be sent messages using winpop.

Now the above option requires different code based upon conditions. I would put all of the code into one prg that could be called by passing the username or machine name and the os to it and the messaging prg determines based on the paramaters passed which method to use. Then inside your app you only have to issue the same command everywhere (calling that prg function whose name remains stagnant. If you want to avoid any of this, you could go with your original idea of creating your own message window by something similar too:

1. Timer runs in app that checks for message pending in the users table. The users table contains fields mentioned above and also a flag with send message .t./.f. The flag is sent to .t. or .f. depending on if they are currently in the app or not. Only users currently in the app will have a flag set to .t.
2. When the timer in the app on the users workstation determines that user is logged in and its record in the user table is set to .t. for send message, it displays a form that displays the message and requires user intervention to close the message. when that happens, the send message flag is set to .f. so it never tries to send the message again.

Just some ideas...

Tracy

>I have a table of all users who are logged into my app. But what is the mechanism for sending them a message? What commands, utilities or APIs do I use? I have a varied group of clients and want to be OS and Network independant.
>
>Brenda
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform