Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
; This will send messages to workstations running the ; "Messenger" service. Could be updated to 6.1 dialogs. Debug(@OFF) ;;;;;;;;;;;;;;;; Generic Initialization ;;;;;;;;;;;;;;;;;;;; IntControl(12,5,0,0,0) If FileExist("debugon.chk") Then Debug(@ON) If FileExist("debugtraceon.chk") Then DebugTrace(@ON,"trace.txt") fromperson="Dave Hartman@KRC" :main newx = IntControl(75,1,0,0,0) newy = IntControl(75,2,0,0,0) MyDialogFormat=`WWWDLGED,5.0` MyDialogCaption=`NetSender` MyDialogX=newx MyDialogY=newy MyDialogWidth=259 MyDialogHeight=93 MyDialogNumControls=12 MyDialog01=`34,16,62,DEFAULT,EDITBOX,workstation,""` MyDialog02=`34,30,62,DEFAULT,EDITBOX,toperson,""` MyDialog03=`34,44,62,DEFAULT,EDITBOX,fromperson,""` MyDialog04=`34,58,218,DEFAULT,EDITBOX,thetext,""` MyDialog05=`2,16,32,DEFAULT,STATICTEXT,DEFAULT,"Workstation:"` MyDialog06=`24,30,10,DEFAULT,STATICTEXT,DEFAULT,"To:"` MyDialog07=`20,44,14,DEFAULT,STATICTEXT,DEFAULT,"From:"` MyDialog08=`2,2,76,DEFAULT,STATICTEXT,DEFAULT,"Net Send message application"` MyDialog09=`2,76,36,DEFAULT,PUSHBUTTON,DEFAULT,"Send",1` MyDialog10=`42,76,36,DEFAULT,PUSHBUTTON,DEFAULT,"Exit",0` MyDialog11=`106,76,148,DEFAULT,VARYTEXT,result,""` MyDialog12=`10,58,24,DEFAULT,STATICTEXT,DEFAULT,"Message:"` ButtonPushed=Dialog("MyDialog") If buttonpushed == 0 Then Goto alldone ;------------------------------------------------------------------------ :process bb=BinaryAlloc(5000) pointer=0 pointer=pointer+1+BinaryPokeStr(bb,pointer,fromperson) pointer=pointer+1+BinaryPokeStr(bb,pointer,toperson) pointer=pointer+1+BinaryPokeStr(bb,pointer,thetext) BinaryWrite(bb,"\\%workstation%\mailslot\messngr") BinaryFree(bb) result = "Message sent" Goto main ;---------------------------------------------------------- :alldone :End Exit
IntControl(72,2,0,0,0) IntControl(1007,1,1|2,"Message","atom.ico") While @True who=AskLine("To whom is this message...","Enter the computername or the username","%who%") text=AskLine(StrCat("And what is the message to ",StrUpper(who),"..."),"Enter the message to the user","%text%") RunHide ("net", StrCat("send ",who," ",text)) EndwhileOr this version goes back to the task tray when completed.
IntControl(72,2,0,0,0) IntControl(1007,1,1|2,"Send Message To Network User","") While @True who=AskLine("To whom is this message...","Enter the computername or the username","%who%") text=AskLine(StrCat("And what is the message to ",StrUpper(who),"..."),"Enter the message to the user","%text%") RunHide ("net", StrCat("send ",who," ",text)) IntControl(1007,3,1|2,"Send Message To Network User","") Endwhile
Article ID: W16036
File Created: 2004:03:30:15:42:24
Last Updated: 2004:03:30:15:42:24