Sign in to follow this  
Followers 0
Joscpe

Sending Text

15 posts in this topic

Is there a way i could send a text file to someone over the internet? I made test programs to try it...

Server

#include <guiconstants.au3>

$ServerWin = GUICreate("Text Transfer Test - Server", 500, 120)
$Going = 0
$a = 0
$f = ""
$FileDest = GUICtrlCreateInput(@MyDocumentsDir, 10, 12, 390, 18)
$Browse = GUICtrlCreateButton("&Browse...", 400, 8, 75, 25)
$Go = GUICtrlCreateButton("&Start", 170, 55, 90, 30)

GUISetState(@SW_SHOW, $ServerWin)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $Browse
            BROWSE()
        Case $msg = $Go
            RunServ()
    EndSelect
    If @error Then MsgBox(1, "Uh Oh", "Holy, you broke it numbnuts!", 3500)
    If $a = 1 Then
        $f = TCPAccept($Listen)
    EndIf
WEnd

Func BROWSE()
    $dir = FileSelectFolder("Select A Directory", @MyDocumentsDir)
    GUICtrlSetData($FileDest, $dir)
EndFunc

Func RunServ()
    If $Going = 0 Then
        $Going = 1
        GUICtrlSetData($Go, "Stop")
        TCPStartup()
        Global $Listen = TCPListen(@IPAddress1, 1234)
        $a = 1
    ElseIf $Going = 1 Then
        $Going = 0
        FileWrite(GUICtrlRead($FileDest)&"\sentfile.txt", $f)
        GUICtrlSetData($Go, "Start")
        $a = 0
        TCPShutdown()
    Else
        MsgBox(1, "Uh Oh", "Holy, you broke it numbnuts!", 3500)
    EndIf
EndFunc

Is it possible to do it?

What I tried to do was send the text in the file to the server and the server writes that to a file. It only puts "-1" in the file....


-Joscpe

Share this post


Link to post
Share on other sites



All your base are belong to us !!

Share this post


Link to post
Share on other sites

That... That was productive.

Anyways, check out YAC-P and erifash's chat program that use TCP commands. Those will shed some light on the inner working of TCP :P


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I downloaded it, i fixed the links to where i put the files and i compiles them. I get an error refering to the server file:

Global $List[$MaxUsers][2] ;[ index ][ socket, username ]

NVM, just had to add into the INI file

I guess I'll just read through the code...

Also... How do you make a skin? :P

Edited by Joscpe

-Joscpe

Share this post


Link to post
Share on other sites

The search button is your friend:

Searched the word "skin"


~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Share this post


Link to post
Share on other sites

in that guys messenger, he uses _TCPSendText (data, ip) but it isnt an actual function, TCPSend(ip, data) is but it doesnt work...


-Joscpe

Share this post


Link to post
Share on other sites

Here are my script files... could someone please help?


-Joscpe

Share this post


Link to post
Share on other sites

I said it before and ill say it again, jordan

All your base are belong to us !!

Share this post


Link to post
Share on other sites

I said it before and ill say it again, jordan

All your base are belong to us !!

:spam:

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Is there a simple way to send files over the internet with autoit??

-is stating something is spam and nothing else, spam?

Edited by Joscpe

-Joscpe

Share this post


Link to post
Share on other sites

:P

aye nuthr bump

Share this post


Link to post
Share on other sites

So I guess there isnt??


-Joscpe

Share this post


Link to post
Share on other sites

I am looking into the same type of function for a chat program I am working on, I want to be able to let the clients do file transfers on our local intranet, I don't need ANYTHING to go over the internet just our local LAN..

Share this post


Link to post
Share on other sites

All your base are belong to us - A Warcraft 3 cheat that makes you automatically win (does not wok online)


"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

#15 ·  Posted (edited)

I made a script about a year ago

http://www.autoitscript.com/forum/index.ph...mp;#entry135054

this can send binary files over internet.

(ow yeah the useless reply at the bottom did not test his source mine actually worked)

its a bit old now but it still works (some gui things donot seem to work)

Larger files always got screwed up because of bad buffer reading so I made a flow control system.

Maybe nice to check maybe not:P

Edited by MrSpacely

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0