Write Integer to Binary File
Verb: binaryWriteInt
Available from: <Standard>
Writes an integer as a binary number into a binary file.
The command interprets all file types (.txt, .html, .pdf, ...) as binary.
Syntax
binaryWriteInt --value(Numeric) --file(BinaryFileWriter)
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--value | Integer | Required | Number | Integer to be written in binary in the file. |
--file | Binary File | Required | Binary File Writer | Open binary file for writing. |
Example
The command writes an integer to a binary file after using the Open Binary File for Writing command to create this file.
defVar --name binaryWriter --type BinaryFileWriter
defVar --name filePath --type String
defVar --name integerValue --type Numeric --value 100
getSpecialFolder --folder "Desktop" filePath=value
openBinaryWriter --mode "Create" --autoflush --share "Write" --path "${filePath}\\binary.txt" --encoding "Default" binaryWriter=value
binaryWriteInt --value ${integerValue} --file ${binaryWriter}
binaryFileClose --file ${binaryWriter}