From WikiChip
Difference between revisions of "mirc/commands/bread"
m (bot: correcting title) |
(→Parameters) |
||
Line 12: | Line 12: | ||
== Parameters == | == Parameters == | ||
* '''<filename>''' - The file name to read from. | * '''<filename>''' - The file name to read from. | ||
− | * '''<bytepos>''' - The starting byte position. | + | * '''<bytepos>''' - The starting byte position, '''remember, this starts at 0, not 1'''. |
* '''<numbytes>''' - The length (bytes) to be read. | * '''<numbytes>''' - The length (bytes) to be read. | ||
* '''<&bvar>''' - The binary variable to store the data in. | * '''<&bvar>''' - The binary variable to store the data in. |
Revision as of 12:11, 12 January 2016
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
Template:mIRC menu The /bread command can be used to read a certain amount of bytes from a file at a given position and store it in a binary variable.
The beginning of the file is position 0.
Synopsis
/bread -t <filename> <bytepos> <numbytes> <&bvar>
Switches
- -t - Reads data up to the next CR/LF
Parameters
- <filename> - The file name to read from.
- <bytepos> - The starting byte position, remember, this starts at 0, not 1.
- <numbytes> - The length (bytes) to be read.
- <&bvar> - The binary variable to store the data in.
Example
;noop $copyExample(FileA,FileB) alias copyExample { ;Read the whole file into a binary variable bread $qt($1) 0 $file($1).size &tempFile ;Write the bytes form the binary variable to a file bwrite $qt($2) 0 -1 &tempFile }
Compatibility
Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
mIRC commands list