変数

1) ユーザー変数

ユーザーにより定義される。型および値は初めて値が代入されたときに決まる。いったん型が決まると違う型の値を代入することはできない。

2) システム変数

あらかじめ型と値が定義され、特定のコマンドと共に使用される。

名前 初期値 システム変数を使用するコマンド
groupmatchstr1 ... groupmatchstr9 文字列 "" waitregex
inputstr 文字列 "" recvln, waitln, waitn, waitrecv, waitregex, sprintf, passwordbox, filenamebox, inputbox
matchstr 文字列 "" waitregex
param2 ... param9 文字列 *1 *1
result 整数 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
timeout 整数 0 recvln, wait, waitevent, waitln, waitrecv, waitregex
mtimeout *2 整数 0 recvln, wait, waitevent, waitn, waitln, waitrecv, waitregex

*1 MACRO 起動時のコマンドラインパラメータの2 〜 9番目がシステム変数 param2 〜 param9 の初期値となる。1番目の文字列はマクロファイル名。"コマンドライン" 参照。
*2 精度は 50 msec 程度。