Dethredic 0 Posted October 15, 2007 Ok, I have 2 computers in my house and I want to be able to send a message from computer x to computer y. I would type a message, and it will make a message box show up on the other computer. I know I will need two separate programs, one for each computer, but I have no experience with the TCP commands, so could someone get me started? "Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it Share this post Link to post Share on other sites
weaponx 16 Posted October 15, 2007 Net Send from the command line???http://www.microsoft.com/resources/documen...d.mspx?mfr=true Share this post Link to post Share on other sites
Uten 9 Posted October 15, 2007 The TCPRecv/TCPSend functions in the help file has a sample of a simple chat program. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Share this post Link to post Share on other sites
murdock 0 Posted October 15, 2007 http://www.autoitscript.com/forum/index.ph...ol+computer+msgCheck out that post, I believe thats exactly what you're looking for. (Its to send a msgbox from one computer to another) Share this post Link to post Share on other sites
Nahuel 1 Posted October 15, 2007 (edited) Or, if you know any Spanish, check out the one I made: [autoit]#include <GUIConstants.au3> #include <GuiIPAddress.au3> #Include <GuiStatusBar.au3> #Include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <Date.au3> Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) ;Esconder Edited October 15, 2007 by Nahuel Share this post Link to post Share on other sites
jvanegmond 307 Posted October 15, 2007 Dethredic, enable to messaging service on each computer and then use the Net Send command. I have it set up like that, and it works miracles. github.com/jvanegmond Share this post Link to post Share on other sites
Valuater 130 Posted October 15, 2007 One I made a while back expandcollapse popupDim $un = @UserName Dim $QT_web = "www.ClickTask.com" $ver = "1.0" ;delete last listing Filedelete(@TempDir & "\a.tmp") Filedelete(@TempDir & "\b.tmp") ; make sure net send is running RunWait("net start messenger","",@SW_HIDE) ;gets the computer list and a few other things RunWait(@ComSpec & ' /c net view > ' & @TempDir & '\a.tmp',"", @SW_HIDE) Sleep(300) ;open the file for working $file = FileOpen(@TempDir & "\a.tmp", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "QT - Error", "Unable to open file.") Exit EndIf ;Creates new file in which the result will be written FileOpen(@TempDir & "\b.tmp", 1) ; Read in lines of text until the EOF is reached in file a.tmp While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop ;find the string "\\" $result = StringInStr($line,"\\") if $result = 1 Then ;find next blank $blankpos = StringInStr($line," ") ;Find length of line $len = StringLen($line) ;calculate from what position to Trim string to the right $len = $len - $blankpos ;Trim all characters after the computer name $line = StringTrimRight($line, $len) ;Trim the // $line = StringTrimLeft($line,2) ;Write line to file, adding "|" FileWrite(@TempDir & "\b.tmp", $line & "|") EndIf Wend FileClose($file) FileDelete(@TempDir & "\a.tmp") $file2 = FileReadline(@TempDir & "\b.tmp", 1) ;install pics $Time_Logo = @TempDir & "\Time-logo.jpg" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Time.jpg", $Time_Logo) $Time_icon = @TempDir & "\Time-Icon.ico" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Time-Icon.ico", $Time_icon) $Sound_clk = @TempDir & "\Sound_clk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Clickerx.wav", $Sound_clk) $Sound_grp = @TempDir & "\Sound_grp.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Group_open.wav", $Sound_grp) $Sound_bar = @TempDir & "\Sound_bar.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\xpinfbar.wav", $Sound_bar) $Sound_lnk = @TempDir & "\Sound_lnk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk) ;GUI Start #include "GUIConstants.au3" ;#include <Process.au3> ;Set GUI Opt("GUICoordMode", 1) ;Opt("GUINotifyMode", 1) $Dummy_win = GUICreate('') $Tmesg_win = GuiCreate("*QTime Station* - PC Messenger ver " & $ver, 482, 335, -1, -1,-1,$WS_EX_ACCEPTFILES,$Dummy_win);, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GUISetFont(9, 400, -1, "MS Sans Serif") GUISetIcon($Time_icon) $Icon_1 = GUICtrlCreatePic($Time_Logo, 393, 10, 75, 70) GUICtrlSetCursor(-1, 0) GUICtrlSetTip(-1, "ClickTask.com") $Group_1A = GuiCtrlCreateGroup( "Message from: ", 20, 10, 350, 50) GUICtrlCreateLabel( $un, 40, 30, 150, 20) ;Create 1 combo box, give focus and populate with contents of b.tmp $Group_1A = GuiCtrlCreateGroup("Message to: ",20, 70, 350, 50) $combo_1 = GUICtrlCreateCombo("", 130, 87, 120, 20) GUICtrlSetState(-1,$GUI_FOCUS) GUICtrlSetData(-1,$file2) $label_1 = GUICtrlCreateLabel( "C&hoose the PC", 40, 90, 80, 20) $Group_4 = GuiCtrlCreateGroup("Last Message Sent", 20, 270, 350, 50) $MSent = GUICtrlCreateLabel("No Recent Messages", 40, 288, 320, 28) ;Create buttons $button_1 = GUICtrlCreateButton("S&end", 390, 190, 80, 30) GUICtrlSetState(-1,$GUI_DEFBUTTON) $button_2 = GUICtrlCreateButton("Set-Up", 390, 275, 80, 20) $button_3 = GUICtrlCreateButton("C&ancel", 390, 300, 80, 20) ;create text input $Group_3 = GuiCtrlCreateGroup("Message Text", 20, 140, 350, 120) GUICtrlCreateLabel("Please Type in Your Test Message in the Box Below", 40, 165, 310, 20) GUICtrlCreateLabel("The Message includes the Time, Date, PC and Sender Name", 40, 185, 320, 20) $text = GUICtrlCreateInput("Message", 40, 215, 310, 20) ;Show the GUI GuiSetState (@SW_SHOW) SoundPlay ($Sound_lnk,1) ;sets tray icon opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown. opt("TrayOnEventMode", 1) ;TraySetClick (16); right click $show_tray = TrayCreateItem ("Show *QTime Station*") TrayItemSetOnEvent (-1, "Set_Show") TrayCreateItem ("") $upgrade_tray = TrayCreateItem ("Check New Releases") TrayItemSetOnEvent (-1, "Set_Update") TrayCreateItem ("") $setup_tray = TrayCreateItem ("Net-Send Setup") TrayItemSetOnEvent (-1, "Set_Setup") TrayCreateItem ("") $about_tray = TrayCreateItem ("About ClickTask.com") TrayItemSetOnEvent (-1, "Set_QT") TrayCreateItem ("") $exit_tray = TrayCreateItem ("Exit *QTime Station*") TrayItemSetOnEvent (-1, "Set_Exit") TraySetState () $msg = 0 While 1; $msg <> -3 $msg = GuiGetMsg() Select case $msg = $button_3 Or $msg = $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $Tmesg_win) SoundPlay ($Sound_grp,1) case $msg = $button_2 ;SoundPlay ($Sound_clk,1) Call("Set_Setup") case $msg = $button_1 SoundPlay ($Sound_clk,1) $CPUID = GuictrlRead($combo_1) If $CPUID = "" Then MsgBox(64,"Send Error 1"," Please choose a PC to *Send* to... ") ContinueLoop EndIf $msg1 = GuictrlRead($text) If $msg1 = "" Or $msg1 = "Message" Then MsgBox(64,"Send Error 2"," Please Type a *Text Message* First... " ) ContinueLoop EndIf $runvar =RunWait(@comspec & " /c net send " & $CPUID & $un & " says: " & $msg1,"",@sw_hide) ;MsgBox(0,"",$runvar) If $runvar > 0 Then MsgBox(64,"Send Error 3"," Your Message *Could Not Be Sent* " & @CRLF & @CRLF & " Please press the *Set-Up* Button " & @CRLF & @CRLF & "and press *Set-Up* on " & $CPUID & " " ) ContinueLoop EndIf GUICtrlSetData ( $MSent, $msg1) EndSelect WEnd Exit ;---------------------------- FUNCTIONS ---------------------- Func Set_Update() SoundPlay ($Sound_clk,1) Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $QT_web) WinWaitActive("") EndFunc Func Set_Show() SoundPlay ($Sound_grp,1) GUISetState(@SW_SHOW, $Tmesg_win) EndFunc Func Set_QT() SoundPlay ($Sound_grp,1) $iMsgBoxAnswer = MsgBox(32, "*QTime Station* , by QTasc (Now ClickTask.com)", "WHO IS, QT APPRAISAL SERVICE CO ?" & @CRLF & "" & @CRLF & "We are a Real Estate Appraisal Company based in Riverside, California. " & @CRLF & "" & @CRLF & "Thank you." & @CRLF & "" & @CRLF & "", 60) Select Case $iMsgBoxAnswer = -1;Timeout EndSelect SoundPlay ($Sound_grp,1) EndFunc Func Set_Exit() SoundPlay ($Sound_lnk,1) Exit EndFunc ;==>Set_Exit Func Set_Setup() SoundPlay ($Sound_clk,1) GUISetState(@SW_HIDE, $Tmesg_win) Run("mmc Services.msc -k netsvcs", @SystemDir) WinWaitActive("Services") Sleep(300) Send("{TAB}") Sleep(300) Send("Messenger") Sleep(300) Send("{ENTER}") Sleep(300) Send("!e") Sleep(300) Send("A") Sleep(300) Send("!A") Sleep(300) Send("!S") Sleep(2000) MsgBox(64,"Finished Set-up"," If all settings are satisfactory... " & @CRLF & " Please press *OK* ") While 3 If Not WinExists("Messenger Properties") Then ExitLoop Sleep(100) WEnd Sleep(100) WinClose("Services") EndFunc ;==>Set_Exit 8) Share this post Link to post Share on other sites
Zedna 282 Posted October 15, 2007 Also look at my NET SEND GUI wrapper Resources UDF ย ResourcesEx UDF ย AutoIt Forum Search Share this post Link to post Share on other sites
Dethredic 0 Posted October 15, 2007 Thanks guys! Just gotta wait for my brother to get off t he other computer, then I will be able to test out some of the net send stuff. "Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it Share this post Link to post Share on other sites
Dethredic 0 Posted October 18, 2007 Ok, well after turning on the Messenger service on both computes nothing worked. And I think It is due to my network setup.I have one router set up in system bridge, and here is a crude drawing to illustrate my point. Any other ideas? "Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it Share this post Link to post Share on other sites
Dethredic 0 Posted October 18, 2007 what ports would I have to forward? "Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it Share this post Link to post Share on other sites
Nahuel 1 Posted October 19, 2007 Well, if you are using the script I gave you, it uses port 65433 (TCP). I think you should check first in both computers that Windows Firewall isn't blocking it (Usually, when you press "connect" you get a warning message where you can 'unblock' your program. You should compile both the server and the client and run them in both computers. If you get the warning, press 'ublock'. Else, add it to the list of exceptions. If this doesn't work then go ahead and do the port forwarding. I don't know that much about networks, so if said something wrong please correct me Share this post Link to post Share on other sites
weaponx 16 Posted October 19, 2007 You shouldn't even have NAT enabled on that wireless router if it's already behind another router, I would move the cable connected to WAN over to one of the switch ports. Share this post Link to post Share on other sites
Dethredic 0 Posted October 19, 2007 (edited) from which router? EDIT: Nahuel, I jut got the newest beta, and I am still getting errors with your script. Edited October 19, 2007 by Dethredic "Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it Share this post Link to post Share on other sites
weaponx 16 Posted October 19, 2007 I am assuming the WAN port on your wireless router is plugged into a switch port on your wired router... I would just plug the wire (coming into wireless WAN port) into a switch port on that wireless router, thereby acting as a switch which will pass DHCP through from the wired router. Share this post Link to post Share on other sites
Dethredic 0 Posted October 19, 2007 the two routers are only connected wirelessly. They are about 80m apart. "Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it Share this post Link to post Share on other sites
Fabry 0 Posted December 2, 2007 I update the program of Nahuel to new version of Autoit. [autoit]#include <GUIConstants.au3> #include <GuiIPAddress.au3> #Include <GuiStatusBar.au3> #Include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <Date.au3> Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) ;Esconder A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza รจ il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center] Share this post Link to post Share on other sites