Jump to content

Split after X bytes


khui
 Share

Recommended Posts

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

Do you read the whole file at once? read it partly instead

FileRead($hFile, $Bytestoread)

Edited 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

Do you read the whole file at once? read it partly instead

FileRead($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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...