andres555 Posted August 21, 2007 Share Posted August 21, 2007 hello....i have the next question....i have a array with binary data....all that binary data if u compile can make for example .jpg file. the problem is that i cant compile all that parts in one variable because is too heavy....and i need write that binary datas with filewrite function for make the file..... $recv is a array of binary data $tr=$recv[0]&$recv[.......]&.................i cant do this because if there are a lot of data and sizes on the array the variable $tr will be full FileWrite(......., $recv[0]&$recv[...]&....) this work but how can i made it general ?????? plz help... sorry my english Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 21, 2007 Moderators Share Posted August 21, 2007 hello....i have the next question....i have a array with binary data....all that binary data if u compile can make for example .jpg file. the problem is that i cant compile all that parts in one variable because is too heavy....and i need write that binary datas with filewrite function for make the file..... $recv is a array of binary data $tr=$recv[0]&$recv[.......]&.................i cant do this because if there are a lot of data and sizes on the array the variable $tr will be full FileWrite(......., $recv[0]&$recv[...]&....) this work but how can i made it general ?????? plz help... sorry my english$sHold For... $sHold &= $array[n] Next FileWrite(...,$sHold) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
andres555 Posted August 21, 2007 Author Share Posted August 21, 2007 (edited) i understand u but the problem is $sHold will be full with a big file in the middle of the array Edited August 21, 2007 by andres555 Link to comment Share on other sites More sharing options...
randallc Posted August 21, 2007 Share Posted August 21, 2007 Hi, maybe write the bytes directly to file from each array value; check HelpFile for API_FileWrite or use funcs in my signature in TailYDF, or search larry's APIfilewrite. Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
andres555 Posted August 21, 2007 Author Share Posted August 21, 2007 (edited) hey..thanks for ur help randallc...i am going to study what u say...anyway i find other problem in my code that maybe is the real problem....is on TCprecv function...i think are missing bytes and for that reason i was think that the variable was full but i think is a mistake......actually i think is not posible send more than 5kb data for tcp....if u want send big packet i think i have to subdivide the data in packets of 5kb or lower....i am going to think about that tonightthanks dudein this url u can find my code... http://www.autoitscript.com/forum/index.ph...mp;#entry390874 is the last post at this moment XD Edited August 21, 2007 by andres555 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