erifash Posted March 27, 2005 Share Posted March 27, 2005 I got bored so I made a net send GUI, and it's pretty cool. You can type in either the name of the computer you want to send it to, or it's ip address. You can also hide or unhide it by pressing CTRL+TAB. And last, for the message type in "::source" (without the quotes) to see the source code. Questions and comments are greatly appreciated! expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> If @OSType = "WIN32_WINDOWS" Then Exit HotkeySet("^{TAB}", "hide") $w = 300 $h = 40 $l = ( @DesktopWidth / 2 ) - ( $w / 2 ) $t = ( @DesktopHeight / 2 ) - ( $h / 2 ) $style = $WS_OVERLAPPED + $WS_SYSMENU + $WS_CAPTION + $WS_MINIMIZEBOX + $WS_VISIBLE $dns = @IPAddress1 $gui = GUICreate("Net Send", $w, $h, $l, $t, $style) $text = GUICtrlCreateInput("message", 0, 0, 300, 20) $name = GUICtrlCreateInput($dns, 0, 20, 250, 20) $send = GUICtrlCreateButton("Send", 250, 20, 50, 20, $BS_DEFPUSHBUTTON) GUISetState() GUICtrlSetState($text, $GUI_FOCUS) GUICtrlSetFont($name, 9, 400, "", "Courier New") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $send If GUICtrlRead($text) <> "" and GUICtrlRead($name) <> "" and GUICtrlRead($text) <> "::source" Then RunWait(@COMSPEC & ' /c net send ' & GUICtrlRead($name) & ' "' & GUICtrlRead($text) & '"', @SystemDir, @SW_HIDE) MsgBox(266240, "Net Send", "The message was sent.") Else If GUICtrlRead($text) = "::source" Then FileInstall("F:\AutoItv3.0.103\GUI\netsend.au3", @TempDir & "\netsend.au3") Sleep(500) Run(@SystemDir & "\notepad.exe " & @TempDir & "\netsend.au3", @SystemDir, @SW_MAXIMIZE) Sleep(500) FileDelete(@TempDir & "\netsend.au3") Else MsgBox(266288, "Net Send", "The message was not sent.") EndIf EndIf EndSelect Sleep(10) Wend Func hide() HotkeySet("^{TAB}", "unhide") WinSetState("Net Send", "", @SW_HIDE) EndFunc Func unhide() HotkeySet("^{TAB}", "hide") WinSetState("Net Send", "", @SW_SHOW) EndFunc I'm pretty sure that it can send over a network (such as my school's) or over the internet... Also, if you want to compile it, you'll have to change the FileInstall() bit. My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
erifash Posted March 27, 2005 Author Share Posted March 27, 2005 I just tested it with my other computer and it can't send over the internet but it can through a network. So, what do you people think about this? My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
layer Posted March 27, 2005 Share Posted March 27, 2005 grrrr, stupid me i thought net send was a program ... i freakin never knew it was a cmd.exe command! but anyways, i think overall, it looks pretty nice! good work! FootbaG Link to comment Share on other sites More sharing options...
layer Posted March 27, 2005 Share Posted March 27, 2005 wait wait, im a little confused, as ive never used net send before.. i tried sending a message to my IP address (public) and a msgbox said message sent, but whats supposed to happen after that? nothing happened suggestions? FootbaG Link to comment Share on other sites More sharing options...
erifash Posted March 27, 2005 Author Share Posted March 27, 2005 (edited) wait wait, im a little confused, as ive never used net send before.. i tried sending a message to my IP address (public) and a msgbox said message sent, but whats supposed to happen after that? nothing happened suggestions?<{POST_SNAPBACK}>ummm... you can use you're computer name (@ComputerName) or your ip address (@IPAddress1) but the default is your ip. If you are connected to the internet, it will return your public ip instead of 127.0.0.1... Try using your computer name or 127.0.0.1...idk, it worked for me when i typed in my public ip and when i typed 127.0.0.1 and when i typed my computer name... the syntax for net send is:NET SEND [name or ip or *] ["message"] Edited March 27, 2005 by erifash My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
erifash Posted March 28, 2005 Author Share Posted March 28, 2005 (edited) Oh, snap i just figured it out! My mom's computer is really disabled and has issues and it won't (for some reason) allow me to use net send at all (even to myself). Maybe norton internet security is getting in the way or you might need admin rights... The program works fine on my win2k laptop. Edited March 28, 2005 by erifash My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
erifash Posted March 28, 2005 Author Share Posted March 28, 2005 Finally, net send uses the windows messenger service to send messages across networks! It could be that security programs are blocking it or it is flat-out not running. I think the process is named msmsgs.exe or something.Yup, see here to find out more about it: http://www.neuber.com/taskmanager/process/msmsgs.exe.html My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
SlimShady Posted March 28, 2005 Share Posted March 28, 2005 (edited) Finally, net send uses the windows messenger service to send messages across networks! It could be that security programs are blocking it or it is flat-out not running. I think the process is named msmsgs.exe or something.Yup, see here to find out more about it: http://www.neuber.com/taskmanager/process/msmsgs.exe.html<{POST_SNAPBACK}>Not true.Windows Messenger (process msmsgs.exe) has nothing to do with NET SEND.To make NET SEND work:Rightclick "My Computer", unfold Services etc.. and click Services.Find "Messenger" and verify that the service is enabled and started.If you want to be sure it works all the time, set the startup type to Automatic. Edited March 28, 2005 by SlimShady Link to comment Share on other sites More sharing options...
erifash Posted March 28, 2005 Author Share Posted March 28, 2005 (edited) Thank you, and there is a shorter way: Run Menu -> services.msc Although I thought windows messenger (msmsgs.exe) was just called Messenger also. I thought they were the same thing. EDIT: hmmm... [C:\WINDOWS\System32\svchost.exe -k netsvcs] is the command line for it. Apparently i was misinformed about that part. Edited March 28, 2005 by erifash My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
igmeou Posted March 30, 2005 Share Posted March 30, 2005 To what I remember... Net Send doesn't support windows 9x right? So is there a way to communicate in the network with mixed OS ranging from 95 to XP?? [font="Arial"]Thanks[/font]If @error = me Then $sorry Else Do $clarifyMe Until $meClear EndIF MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever) Link to comment Share on other sites More sharing options...
BillLuvsU Posted March 30, 2005 Share Posted March 30, 2005 (edited) Ok, could someone please compile this for me because for some reason my guiconstants isn't working at school so I can't even run it, but this is very cool, nice work! I've been trying to do this for ever! Edit: Fixed grammer Edited March 30, 2005 by fear1313 [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
BigDaddyO Posted March 30, 2005 Share Posted March 30, 2005 I was going to put one of these together several months ago until I realized that XP SP-2 disables the Messenger service by default. so if you have XP SP-2 you would have to go into services, Enable the Messenger service and then start it before you could use this little utility. Link to comment Share on other sites More sharing options...
bshoenhair Posted March 30, 2005 Share Posted March 30, 2005 grrrr, stupid me i thought net send was a program ... i freakin never knew it was a cmd.exe command! but anyways, i think overall, it looks pretty nice! good work! <{POST_SNAPBACK}>FYI It's not a "cmd.exe command"It is a program located @ "C:\WINDOWS\system32\net.exe""Send" is a commandline parameter of cmd.exe Link to comment Share on other sites More sharing options...
evod510 Posted March 31, 2005 Share Posted March 31, 2005 just wanna add some info, few people had already done the gui net send if you search the forum you can find among the best gui net send done by Josbe (JSendx v0.1) and CyberSlug (Slugsend). The one done by CyberSlug is very intersting cause it can be like an instant messaging. fyi net send only work in lan and with messenger service running. here is what i done using message box Do $PC = InputBox("Message To", "Please Specify PC Name:") If @error == 1 Then Exit Until $PC <> " " Do $Text = InputBox("Message Text", "Enter your message.") If @error == 1 Then Exit Until $Text <> " " RunWait(@comspec & " /c net send "& $PC &" "& $Text,"",@sw_hide) if RunWait(@comspec & " /c net send "& $PC &" "& $Text,"",@sw_hide) == 0 Then MsgBox(0, $PC,"Message Send") Else MsgBox(0, $PC,"Cannot Send Message") EndIf Cheers Link to comment Share on other sites More sharing options...
layer Posted March 31, 2005 Share Posted March 31, 2005 FYI It's not a "cmd.exe command"It is a program located @ "C:\WINDOWS\system32\net.exe""Send" is a commandline parameter of cmd.exe<{POST_SNAPBACK}>same difference FootbaG Link to comment Share on other sites More sharing options...
ChazFire's REVENGE Posted March 31, 2005 Share Posted March 31, 2005 Nice to see i wasnt the only one intrested in making a net send Gui. I made one its pretty sweet if i do say so myself, and I do. For now it only works with my workgroup but am currently learning how to automaticly get the workgroup to replace User in this cmd "net send User Message." or some other form of Id to the comp of wich you'll send, a dropdown list, maybe? At school all the classes or on on sub lans(workgroup). My class is lake# the # is what comp, obviously thier all #'d so it simply take the radio button you choose and adds the # to Lake and the message PM me if you want a copy of it uncompiled. Thanks to cyberslug for almost all help i needed [font="Arial"]--------When you go to jail a friend will bve thier to bail you out, but a best friend will be sitting right next to you saying, "D*** we F**ked up!"--------A friend helps you move, but a best friend helps you move dead bodies?Which brings me to my question, what kind of friend are you?[/font] Link to comment Share on other sites More sharing options...
buzz44 Posted March 31, 2005 Share Posted March 31, 2005 heres my netsend, lol seems everone is doing one or has already done onehttp://www.autoitscript.com/forum/index.ph...wtopic=7228&hl=dates 2nd january lol, it sux qq Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 31, 2005 Share Posted March 31, 2005 (edited) ok everyone look at my awesome netsend program expandcollapse popup#include <guiconstants.au3> #include <color.au3> Opt ( "GuiOnEventMode", 1 ) Opt ("WinWaitDelay", 20) Opt("ProvideRunStdout", 1) Opt("ProvideRunStdin", 1) Global Const $HTCAPTION = 2 Global Const $WM_NCLBUTTONDOWN = 0xA1 $SendTo = "" $hwnd = GUICreate ( "Zen Messenger", 400, 400, -1, -1, $WS_POPUP ) GUISetOnEvent ( -3, "Quit" ) GUICtrlCreateButton ( "", -100, -100, 0, 0 );Make it so no buttons get the dots on them when the program starts GUICtrlCreateLabel ( "Zen Messenger", 5, 3, 200, 20 ) GUICtrlSetColor ( -1, 0xFFFFFF ) GUICtrlSetOnEvent ( -1, "CaptureIt" ) GUICtrlSetResizing ( -1, $GUI_DOCKALL ) $Shade = GUICtrlCreateButton ( "5", 325, 0, 25, 25 ) GUICtrlSetFont ( -1, -1, -1, -1, "Webdings" ) GUICtrlSetOnEvent ( -1, "Shade" ) GUICtrlCreateButton ( "0", 350, 0, 25, 25 ) GUICtrlSetFont ( -1, -1, -1, -1, "Webdings" ) GUICtrlSetOnEvent ( -1, "Minimize" ) GUICtrlCreateButton ( "r", 375, 0, 25, 25 ) GUICtrlSetFont ( -1, -1, -1, -1, "Webdings" ) GUICtrlSetOnEvent ( -1, "Quit" ) $SEdt = GUICtrlCreateEdit ( "", 0, 275, 320, 125, 0 ) GUICtrlSetResizing ( -1, $GUI_DOCKALL ) GUICtrlCreateButton ( "Send", 320, 275, 80, 25, $BS_DEFPUSHBUTTON ) GUICtrlSetResizing ( -1, $GUI_DOCKALL ) GUICtrlSetOnEvent ( -1, "SendMessage" ) $Connect = GUICtrlCreateButton ( "Connect", 320, 375, 80, 25 ) GUICtrlSetResizing ( -1, $GUI_DOCKALL ) GUICtrlSetOnEvent ( -1, "Connect" ) $Edit = GUICtrlCreateEdit ( @TAB & @TAB & @TAB & "Zen Messenger 1.00", 0, 25, 400, 250, $ES_READONLY ) GUICtrlSetResizing ( -1, $GUI_DOCKALL ) GUICtrlSetColor ( -1, 0x000000 ) GUICtrlSetBkColor ( -1, 0xFFFFFF ) $Title = GuiCtrlCreateGradient(0x0000aa, 0xccccff, 0, 0, 400, 25) GUICtrlSetOnEvent ( $Title, "CaptureIt" ) GUICtrlSetResizing ( $Title, $GUI_DOCKALL ) GUISetState ( ) While 1 Sleep ( 10 ) If WinExists ( "Messenger Service" ) Then WinSetState ( "Messenger Service", '', @SW_HIDE ) $Text = ControlGetText ( "Messenger Service", '', 65535 ) WinClose ( "Messenger Service" ) $TextFrom = StringSplit ( $Text, " " ) $TextFrom = $TextFrom[3] $Text = StringSplit ( $Text, @CRLF ) $Text = $Text[5] GUICtrlSetData ( $Edit, GuiCtrlRead ( $Edit ) & @CRLF & $TextFrom & ": " & $Text ) EndIf WEnd Func Quit() Exit EndFunc Func GUICtrlCreateGradient($nStartColor, $nEndColor, $nX, $nY, $nWidth = 255, $nHeight = 20) Local $color1R = _ColorGetRed($nStartColor) Local $color1G = _ColorGetGreen($nStartColor) Local $color1B = _ColorGetBlue($nStartColor) Local $nStepR = (_ColorGetRed($nEndColor) - $color1R) / $nHeight Local $nStepG = (_ColorGetGreen($nEndColor) - $color1G) / $nHeight Local $nStepB = (_ColorGetBlue($nEndColor) - $color1B) / $nHeight $Ret = GuiCtrlCreateGraphic ($nX, $nY, $nWidth, $nHeight) For $i = 0 To $nHeight - $nY $sColor = "0x" & StringFormat("%02X%02X%02X", $color1R + $nStepR * $i, $color1G + $nStepG * $i, $color1B + $nStepB * $i) GUICtrlSetGraphic (-1, $GUI_GR_COLOR, $sColor, 0xffffff) GUICtrlSetGraphic (-1, $GUI_GR_MOVE, $nX, $nY + $i) GUICtrlSetGraphic (-1, $GUI_GR_LINE, $nX + $nWidth, $nY + $i) Next Return $Ret EndFunc func captureit() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $hwnd,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFunc Func Shade() GUICtrlSetOnEvent ( $Shade, "Unshade" ) GUICtrlSetData ( $Shade, "6" ) $pos = WinGetPos ( $hwnd ) #cs $x = $pos[0] $y = $pos[1] $width = $pos[2] $height = $pos[3] For $i = 0 To 375 Step 6 WinMove ( $hwnd, '', $x, $y, $width, $height - $i ) Sleep ( 1 ) Next GUICtrlSetPos ( $Edit, -1000, -1000 ) #ce WinMove ( $hwnd, '', $pos[0], $pos[1], $pos[2], 25 ) EndFunc Func Unshade() ;GUICtrlSetPos ( $Edit, 0, 25 ) GUICtrlSetOnEvent ( $Shade, "Shade" ) GUICtrlSetData ( $Shade, "5" ) #cs $pos = WinGetPos ( $hwnd ) $x = $pos[0] $y = $pos[1] $width = $pos[2] $height = $pos[3] For $i = 0 To 375 Step 6 WinMove ( $hwnd, '', $x, $y, $width, $height + $i ) Sleep ( 1 ) Next #ce $pos = WinGetPos ( $hwnd ) WinMove ( $hwnd, '', $pos[0], $pos[1], $pos[2], 400 ) EndFunc Func Minimize() WinSetState ( $hwnd, '', @SW_MINIMIZE ) EndFunc Func Connect() $SendTo = InputBox ( "Zen Messenger", "Computer name" & @CRLF & "(IP Address or Computer Name)", "192.168.0.100" ) GUICtrlSetData ( $Connect, "Disconnect" ) GUICtrlSetOnEvent ( $Connect, "Disconnect" ) EndFunc Func Disconnect() GUICtrlSetData ( $Connect, "Connect" ) GUICtrlSetOnEvent ( $Connect, "Connect" ) EndFunc Func SendMessage() If $SendTo = "" Then MsgBox ( 16, "Zen Messenger", "Not connected!" ) Else Run ( @ComSpec & ' /c net send "' & @IPAddress1 & '" "' & GUICtrlRead ( $SEdt ) & '"', @SystemDir, @SW_HIDE ) $pid = Run ( @ComSpec & ' /c net send "' & $SendTo & '" "' & GUICtrlRead ( $SEdt ) & '"', @SystemDir, @SW_HIDE ) GUICtrlSetData ( $SEdt, '' ) $ret = StdoutRead ( $pid ) If StringInStr ( $ret, "successfully" ) Then ; Else MsgBox ( 16, "Zen Messenger", "There was an error sending the message." & @CRLF & @CRLF & "Net send return:" & @CRLF & $ret ) EndIf EndIf EndFunc edit: oh yeah, you need the latest beta or the stdout function wont work and it can't detect errors Edited March 31, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
evod510 Posted April 1, 2005 Share Posted April 1, 2005 edit: oh yeah, you need the latest beta or the stdout function wont work and it can't detect errors<{POST_SNAPBACK}>where is the beta stdout function cant find it Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 1, 2005 Share Posted April 1, 2005 in the developers forum "Autoit v3.1.0++" i think [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now