Read Binary File Decimal
Verb: binaryReadDecimal
Available from: <Standard>
Gets a decimal value from a binary file.
The command interprets all file types (.txt, .html, .pdf, ...) as binary.
Syntax
binaryReadDecimal --file(BinaryFileReader) (Numeric)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--file | Binary reader | Required | Binary File Reader | Binary file used for reading. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Decimal | Number | Decimal value contained in binary file. |
Example
Gets a decimal value saved in binary to a text file.
defVar --name openBinaryReader --type BinaryFileReader
defVar --name decimalValue --type Numeric
//Open the file informed for reading.
//Download the following file to execute the command.
openBinaryReader --share "Read" --path "binaryDecimal.txt" --encoding "Default" openBinaryReader=value
//Get the decimal value from the file.
binaryReadDecimal --file ${openBinaryReader} decimalValue=value
logMessage --message "${decimalValue}" --type "Info"
//Returns the decimal value.
For the correct operation of the script above, it is necessary to download the file and enter its path in the "Path" parameter of the "Open Binary File to Read" command.