ลองสร้างเป็นไฟล์ .js นะครับ โค๊ดประมาณนี้
template_header = "VERSION BUILD=6650406 RECORDER=FX" + isLF;
template_header += "SET !ERRORIGNORE YES" + isLF;
template_header += "SET !ERRORCONTINUE YES" + isLF;
template_header += "SET !EXTRACT_TEST_POPUP NO" + isLF;
template_header += "SET !TIMEOUT_TAG 2" + isLF;
template_header += "SET !TIMEOUT 300" + isLF;
template_header += "SET !LOOP 1" + isLF;
imacro_name = "CODE:"+ template_header + isLF;
imacro_name += "TAB T=1"+ isLF;
for(i=1;i<=loops; i++){
.
.
.
something you want
.
.
.
}
iimPlay(imacro_name);