khui Posted August 18, 2009 Share Posted August 18, 2009 Hey, i want to split my image(which is currently 500kb) after 4kb and put it into an array so i can do a For-loop to send them with TCPSend. I tried with just sending the whole file without splitting or anything, well, i got the size which was 559688 and i sent the whole file, first i recieved one chunk, it contained Prt:binaryshit then it wrote that to a file, the second chunk came and it didnt say Prt: therefore it didnt get written to the file... Its able to send about 4kb per package but i think im reducing in to 2kb just in case. (I know it would be alot easier to just send it over another port, but as im not able to open ports i want to do it with a sign that says its a print screen picture, Prt:) Thanks for reading, i really appriciate it! i > * Link to comment Share on other sites More sharing options...
colafrysen Posted August 18, 2009 Share Posted August 18, 2009 (edited) Do you read the whole file at once? read it partly instead FileRead($hFile, $Bytestoread) Edited August 18, 2009 by colafrysen [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] Link to comment Share on other sites More sharing options...
khui Posted August 23, 2009 Author Share Posted August 23, 2009 Do you read the whole file at once? read it partly insteadFileRead($hFile, $Bytestoread)Yeah, i did like in your example, except i want to modify the size of $Bytestoread to 1/20 of the filesize.Thought i dont think that is the problem after a closer look, but thanks for replying. i > * Link to comment Share on other sites More sharing options...
monoceres Posted August 23, 2009 Share Posted August 23, 2009 Pseudo code: Open file in binary mode Do Read 2 KB Send read data Until End-Of-File Broken link? PM me and I'll send you the file! 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