Jump to content

Send a certain amount of bytes


WannaBeGut
 Share

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! :)

Link to comment
Share on other sites

_StringRepeat  ?

Edit :
On just this :

Local $s = "a"
Local $sNewString

For $i = 1 To 12
    $sNewString &= $s
Next
ConsoleWrite($sNewString)

 

Edited by jguinch
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...