
-----------------------------------
Andy
Thu May 29, 2003 7:35 am

file transfering
-----------------------------------
is it possible to have file transfer on a chat program made by turing??

-----------------------------------
JSBN
Thu May 29, 2003 7:50 am


-----------------------------------
yes, but from what i have heard, it is hard to go for more than 2 connections at a time :?

-----------------------------------
Tony
Thu May 29, 2003 9:48 am


-----------------------------------
open file as binary and send in packages untill the file is put back together on the other side.

-----------------------------------
Homer_simpson
Thu May 29, 2003 1:57 pm


-----------------------------------
u dont need 2 connections but... u can only send files that have normal characters... =/... if anyone knows how to transfer a file with ascii or binary file like jpeg please pm me...

-----------------------------------
Andy
Thu May 29, 2003 6:15 pm


-----------------------------------
can i just open the file as a text file and send it over slowly, and then use File.Rename to make it back to what ever extention it was before?

-----------------------------------
Homer_simpson
Thu May 29, 2003 7:46 pm


-----------------------------------
it's not the file extention that matters it's the file contents that matter...

-----------------------------------
Andy
Thu May 29, 2003 8:03 pm


-----------------------------------
i know, i was just saying, if i transfered the data within the file by opening it as a txt, maybe it'll work

-----------------------------------
Dan
Thu May 29, 2003 10:33 pm


-----------------------------------
turing net comands have a bad haibt of losing bytes in the trasfer so the file may not wrok if it is like an exe or mp3 when you get it. txt and doc files may wrok a litte.

-----------------------------------
Homer_simpson
Fri May 30, 2003 7:50 am


-----------------------------------
lol turing sux... =Ãž

-----------------------------------
Andy
Fri May 30, 2003 8:14 am


-----------------------------------
stupid turing... damn holtsoft

-----------------------------------
hez
Sat May 31, 2003 6:29 pm

i ahve done file transfer before
-----------------------------------
i have done file transfer before (NON-BIARY)

here is the code if you need it:

%--------------------------------------------------REMOTE FILE SEND STUFF----------------------------
%----------Must have varaible --------------
var lock : int := 0
var rou2 : string := ""
%Load Bar
procedure GUIpercent (x1, y1, x2, y2, num : int)

    drawfillbox (x1 - 2, y1 - 2, x2 + 2, y2 + 2, grey)
    drawbox (x1 - 2, y1 - 2, x2 + 2, y2 + 2, black)

    for i : 1 .. round ((x2 - x1) * num / 100) by 10
        drawfillbox (x1 + i, y1, x1 + i + 7, y2, blue)
    end for

end GUIpercent


%----------------SAFE MODE TRANSFER PROCEDURE-------------
procedure safe
    var temp : string
    put "Do you want to transfer files in safe or fast mode?"
    put "Safe Mode: Less Chance of Data Loss"
    put "Fast Mode: More Chance of Data Loss"
    put "(S / F)"
    get temp
    put temp
    if length (temp) > 1 then
        put "INVALID ENTRY"
        delay (1000)
        cls
        safe
    elsif temp not= "s" and temp not= "S" and temp not= "F" and temp not= "f" then
        put "INVALID ENTRY"
        delay (1000)
        cls
        safe
    elsif temp = "s" or temp = "S" then
        lock := 0
    else
        lock := 1
    end if
end safe

%---------------------------------SEND MODULE--------------------------
procedure filesend
    var w1 : int
    w1 := Window.Open ("title:SEND MODULE,graphics:500;200,nobuttonbar")
    %-----------------get file name-----
    var file : string
    %------------menu choce-----------
    var c : int
    %----------fILEid----------
    var send : int
    %----TYPE of OUTPUT/INPUT------
    var typ : string := ""
    %------------port--------
    var p1 : int := 28001
    %-----------connection path-------------
    var netStream : int
    %-----------------net address----------
    var net : string
    %----------------percent done-------------
    var rou : real
    var lines, totallines : real := 0
    var temp : real := 0
    %--------------End percent done---------
    safe
    cls
    %--------------------------GET READY TO SEND----------------
    put "Enter file name to send....  " ..
    get file
    cls
    %---------------------SIZE------------------------
    put "Please hold... Calculating Size..."
    open : send, file, get
    loop

        exit when eof (send)
        get : send, typ : *
        totallines := totallines + 1

    end loop
    close (send)
    %---------------------CONTINUE----------------
    cls
    put "Enter host to send file too...  " ..
    get net
    cls
    put "Opening connection...."
    netStream := Net.OpenConnection (net, p1)
    cls
    if netStream 