AutoIt outputs this
0x39332E36373239383231313433363732
This is my AutoIt code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <CommMG.au3> ;or if you save the commMg.dll in the @scripdir use #include @SciptDir & '\commmg.dll'
#include <String.au3>
$error = ""
$rand = Random(0, 100)
$rand = StringToBinary($rand)
ConsoleWrite($rand & @CR)
_CommSetPort(3, $error, 9600, 8, 0, 1, 0)
_CommSendString($rand, 8)
_CommCloseport()