Glyph Posted December 5, 2006 Posted December 5, 2006 Heres an example, this is the server script expandcollapse popupGlobal Const $IP = @IPADDRESS1 ;Local IP address on NIC #1 Global Const $Port = 51200 Dim $Socket = -1 ;TCPAccept/Main socket Dim $Listen = -1 ;TCPListen Dim $Buffer = -1 ;TCPRecv TCPStartup() $Listen = TCPListen ($IP, $Port) While 1 $Socket = TCPAccept ($Listen) If $Socket = -1 Then ContinueLoop DoStuff ($Socket) WEnd Func DoStuff ($Socket) $Buffer = TCPRecv ($Socket, $Port) If $Buffer Then Switch $Buffer Case "Hello" ;( this is where i want the file to be sent)======================= EndSwitch EndIf EndFuncoÝ÷ Ø ÝrXجjëh×6 #include<guiconstants.au3> Global Const $ServerIP = @IPADDRESS1 ;Local IP address on NIC #1 Global Const $Port = 51200 Dim $Buffer = -1 ;TCPRecieve Dim $Socket = -1 ;TCPConnect/Main socket TCPStartUp() Opt("GUIOnEventMode", 1) GUICreate ("Client", 260, 100) $Button = GUICtrlCreateButton ("Button", 170, 70, 80, 20, $BS_DEFPUSHBUTTON) GUICtrlSetOnEvent($button, "_Button") GUISetState () While 1 Sleep(10) If $socket = -1 then ContinueLoop $Buffer = TCPRecv ($socket, $Port) If Not $Buffer Then ContinueLoop Switch $Buffer Case "Hi!" ;( this is where i want the file to be recieved)======================= EndSwitch WEnd Func _Button () $Socket = TCPConnect ($ServerIP, $Port) TCPSend ($Socket, "Hello") EndFunc Please help... i read the readme, still can't figure it out. tolle indicium
Richard Robertson Posted December 5, 2006 Posted December 5, 2006 Readme? Try the help file instead. The help file has real documentation. This looks like a "write a script or snippet for me" request.
Glyph Posted December 5, 2006 Author Posted December 5, 2006 (edited) Help file readme, same thing to me... anyway i seriously read the crap out of this i've been working on it all day, and i can't find the command to make it send the file. everything i try gets an error... sorry for sounding like a beggar i don't mean to be... Edited December 5, 2006 by backstabbed tolle indicium
Snarg Posted December 6, 2006 Posted December 6, 2006 It's amazing what this link can produce:http://www.autoitscript.com/forum/index.php?showtopic=19342 A little reading goes a long way. Post count means nothing.
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