Jump to content

Send a certain amount of bytes

Recommended Posts


Hello! :)

This is my first Thread / Post here, I hope I'am in the right section.. ._.

Alright, thats my problem: I made a little script which sends the amount of bytes you want it to ($bytestosend). I've gotten this far:

$bytes = GUICtrlRead($bytestosend)
  $ibytes = ($bytes*a)
  $ierror = 0
  $socket = TCPConnect($host, $iport)
  $TCPSend = TCPSend($socket, $ibytes)

As you can see I tried to multiply $bytes with "a", (let's say $bytes = 12) I would like the result to be  "aaaaaaaaaaaa", but you cant multiply numbers with letters, (12*a=0). I hope someone can figure it out! .__.

Excuse my bad English and thank you in advance! :)

Share this post

Link to post
Share on other sites

_StringRepeat  ?

Edit :
On just this :

Local $s = "a"
Local $sNewString

For $i = 1 To 12
    $sNewString &= $s


Edited by jguinch
  • Like 1

Share this post

Link to post
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


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.