Get Binary File Boolean
Verb: binaryReadBool
Available from: <Standard>
Gets a boolean value from a binary file.
The command considers all file types as binary (.txt, .html, .pdf etc.).
Syntax
binaryReadBool --file(BinaryFileReader) (Boolean)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--file | Binary file | Required | Binary File Reader | Binary file used for reading. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Boolean | Boolean | Boolean value contained in the binary file. |
Example
Gets a boolean value that was converted to binary in a text file.
defVar --name binaryReader --type BinaryFileReader
defVar --name boolean --type Boolean
// Open the file informed for reading.
// Download the following file to execute the command.
openBinaryReader --share "Read" --path "binaryBoolean.txt" --encoding "Default" binaryReader=value
// Get the boolean value contained in the file.
binaryReadBool --file ${binaryReader} boolean=value
logMessage --message "${boolean}" --type "Info"
// Returns the boolean 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.
Remarks
For the Get Binary File Boolean command to work correctly, there must be a file with a boolean value converted to binary. The Binary file parameter uses the variable that is generated by the Open Binary File for Reading command, which holds the file containing the binary value.