# Variables

1) User variables

Defined by user. The type of a variable is determined when a value (integer or string) is assigned to it for the first time. Once the type of the variable is determined, values of a different type cannot be assigned to it.

2) System variables

Each system variable has a predefined type and value. Used with particular commands.

Variables | Type | Initial value | Related commands
--- | --- | --- | ---
groupmatchstr1 ... groupmatchstr9 | string | "" | waitregex, strjoin, strsplit, strmatch strreplace
inputstr | string | "" | recvln, waitln, waitn, waitrecv, waitregex, sprintf, passwordbox, filenamebox, inputbox
matchstr | string | "" | waitregex, strmatch
param1, param2 ... param9 | string, integer | *1 | *1
params | string array | *1 | *1
paramcnt | integer | *1 | *1
result | integer | 0 | bplusrecv, bplussend, connect, cygconnect, kmtfinish, kmtget, kmtrecv, kmtsend, logopen, quickvanrecv, quickvansend, recvln, testlink, wait, waitevent, waitln, waitn, waitrecv, waitregex, xmodemrecv, xmodemsend, zmodemrecv, zmodemsend, sprintf, str2int, strcompare, strlen, strmatch, strscan, fileconcat, filecopy, filecreate, filedelete, fileread, filereadln, filerename, filesearch, filestrseek, filestrseek2, findfirst, findnext, clipb2var, crc32file, getdate, gettime, getver, ifdefined, var2clipb, yesnobox, getfileattr, setfileattr, foldercreate, folderdelete, foldersearch
timeout | integer | 0 | recvln, wait, wait4all, waitevent, waitn, waitln, waitrecv, waitregex
mtimeout *2 | integer | 0 | recvln, wait, wait4all, waitevent, waitn, waitln, waitrecv, waitregex

- *1 When MACRO program is started, the first parameter(macro filename) is stored into param1 and params[1]. From the second to the ninth parameters are stored into from param2 to param9, and from params[2] to params[9]. The tenth or later parameter is stored into params[10] or later. Please refer to Command line.
- *2 Precision is about 50 msec.