CodyBarrett Posted December 29, 2008 Share Posted December 29, 2008 i wanna send files... exes... anything.. and have a display picture sent to the client\server of an tcp chat is this possible with autoit? [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
martin Posted December 29, 2008 Share Posted December 29, 2008 i wanna send files... exes... anything.. and have a display picture sent to the client\server of an tcp chat is this possible with autoit?I suppose that if the tcp chat is just for text then you could convert the files to readable text and send them that way assuming they can be converted the other end. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
jvanegmond Posted December 29, 2008 Share Posted December 29, 2008 I suppose that if the tcp chat is just for text then you could convert the files to readable text and send them that way assuming they can be converted the other end.Yep, ideally you would use Base64 for that purpose.Although you have 2 other options.1) Clients connect directly to eachother, this requires correct port forwarding if they own a router. MSN does this as a primary option.Or .. You do the following ( MSNs secondary option, most used. )1) Two clients establish the fact that they are going to be sharing a file with each other, who sends it, who receives. This is done on the normal connection.2) The server then tells both of the clients to connect to an IP:Port opened especially for them. Some authentication is done based on previously established facts.3) The one who sends it starts sending the file as binary data, and the server just relays the messages to the client. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Xand3r Posted December 29, 2008 Share Posted December 29, 2008 1) Two clients establish the fact that they are going to be sharing a file with each other, who sends it, who receives. This is done on the normal connection.2) The server then tells both of the clients to connect to an IP:Port opened especially for them. Some authentication is done based on previously established facts.3) The one who sends it starts sending the file as binary data, and the server just relays the messages to the client.it's always better to try to connect the clients to each other and only if that fails try the "proxy" way Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 30, 2008 Author Share Posted December 30, 2008 well... i know how to share TEXT docments... but for pictures and other files.. i tried converting a .bmp to binary and it maxed out the autoit character per line.... so... any ideas for files other than text [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
jvanegmond Posted December 30, 2008 Share Posted December 30, 2008 well... i know how to share TEXT docments... but for pictures and other files.. i tried converting a .bmp to binary and it maxed out the autoit character per line.... so... any ideas for files other than textShow us your code, then please. You should be able to send files ( in chunks ) just fine.it's always better to try to connect the clients to each other and only if that fails try the "proxy" wayThat's what I said. Thanks for repeating me. github.com/jvanegmond Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 31, 2008 Author Share Posted December 31, 2008 well.. here are the server.au3 (modified from john2006) and the client.au3(same ORIGINAL author) BTW i have no idea where to start with file sending EXCEPT for texts..(havent added text sharing in yet) ;i didnt want to post the whole code; keep these files IN THE SAME FOLDER [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
TooManySecrets Posted December 31, 2008 Share Posted December 31, 2008 well.. here are the server.au3 (modified from john2006) and the client.au3(same ORIGINAL author) BTW i have no idea where to start with file sending EXCEPT for texts..(havent added text sharing in yet);i didnt want to post the whole code;keep these files IN THE SAME FOLDERheres what you could dosplit the file into 1kb chunkssend it in binary-stringformat(for example: 0x0001c)return it to stringsave it to file Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 31, 2008 Author Share Posted December 31, 2008 urmm... ill lookinto the binary stuff... spliting into 1kb's would take a while wouldnt it.. also REFORMING the file after splitting and sending then recieving how would you rejoin the file?... lol as you can see im newbish at internet protocals [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
TooManySecrets Posted December 31, 2008 Share Posted December 31, 2008 urmm... ill lookinto the binary stuff... spliting into 1kb's would take a while wouldnt it.. also REFORMING the file after splitting and sending then recieving how would you rejoin the file?... lol as you can see im newbish at internet protocalsuse stringchop by siao to splip the string $array = _StringChop($data,1024) Func _StringChop($string, $size) $count = Ceiling(StringLen($string)/$size) Dim $array[$count+1], $start = 1 For $i = 1 To $count $array[$i] = StringMid($string, $start, $size) $start += $size Next $array[0] = $count Return $array EndFunc then you send your initialization protocol via the chat room(eg: inittransfer filename|lol.exe numberofparts|todo:insertnumberofpartshere) then for $i = 1 to $array[0] sendmsgtochatroom($partnum & "|" & string(binary($array[$i]) next sendmsgtochatroom("alldone") the client would: listen for inittransfer get the file name getthe number of parts declare $array[$numberofparts + 1] $array[0] = $numberofparts start reciving data and would put it into the array then would for $i = 1 to $array[0] filewrite("filename",binarytostring($array[$i]) next exit Link to comment Share on other sites More sharing options...
CodyBarrett Posted December 31, 2008 Author Share Posted December 31, 2008 0_0 uhhh lol ill get back to you on this [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] 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