int iRet#dim test
int iVar = 20
int iVarRandom = 0
int iLoopCnt1 = 0, iLoopCnt2 = 0
int iLoopCntCmp = 0
loop iVar < 10000&_
#loop1
iVar = iVar + 1
echo "iVar = " & iVar
loop true
echo "wait &_
\t \\ &_
sendstr \\test" # &_
test
iRet=waitstr "","xterm bright", 1 * 1000 #waitstr test
if iRet<>0
loop iLoopCntCmp < 1
iLoopCntCmp = iLoopCntCmp + 1
echo "if - wait 宏测试 hello"
end loop
else if iRet == 1 #else if test
echo "if - wait xterm bright"
else #else test
echo "if - wait timeout"
exit loop
end if
end loop
iVarRandom = random iVar + 300, 500 + iVar #random test
echo "iVarRandom = " & iVarRandom
delay iVarRandom + 100 #delay test
iRet = waitstr "宏测试 &_
hello","xterm bright", 2000
select iRet #select test
case 1 #case test
echo "select - wait 宏测试 _hello"
case 2
echo "select - wait xterm bright"
case else
echo "select - wait timeout"
end select
#echo "this is nest #1"
echo "到此一游\t #1"
sendstr "到此一游 #1"
delay &_
100
delays &_
1
iLoopCnt1 = 0
loop iLoopCnt1 < 3#loop2
iLoopCnt1 = iLoopCnt1 + 1
#echo "this is nest #2"
echo "到此一游\t &_
#2"
sendstr "到此一游 #2"
iLoopCnt2 = 0
loop iLoopCnt2 < 3#loop3
iLoopCnt2 = iLoopCnt2 + 1
#echo "this is nest #3"
echo "到此一游\t #3"
sendstr "到此一游 #3"
end loop
end loop
end loop