kyle83
IS-IT--Management
- Aug 4, 2006
- 8
Hi,
Im fairly new to aspect scripting. In the following code below, I want it to loop this script every 3 minutes. I had it working for a little while, then all of a sudden it seemed to ignore the whole waituntil command, and would run over and over again, one right after the other. It wouldn't wait 3 minutes in between each iteration.. any idea?? Thanks in advance.
- Kyle
proc main
#include "pw5menu.inc"
integer Loops = 0
string ThisTime
long TimeNum,NextTimeNum
while (Loops++) < 200
ThisTime = $Time24
strsltime $DATE ThisTime TimeNum ;converts a date & time string to a long variable
NextTimeNum = TimeNum + 180 ;Waiting for 3 minutes
transmit " PRINT IMSKU IMDLS IMDLR XIMQMN XIMQOM XIMQOH XIMQOO XIMQAL XIMQTD XIMQB\"
pause 1
transmit "^M"
waitfor "->"
pause 1
transmit "WHERE IMSEQNUM<99999"
pause 1
transmit "^M"
waitfor "'T'erminal, 'P'rinter, or 'F'ile? "
transmit "F^M"
waitfor " File Name? "
transmit "QUANTITIES.TXT"
pause 1
transmit "^M"
waitfor "Q>"
waituntil NextTimeNum
endwhile
endproc
Im fairly new to aspect scripting. In the following code below, I want it to loop this script every 3 minutes. I had it working for a little while, then all of a sudden it seemed to ignore the whole waituntil command, and would run over and over again, one right after the other. It wouldn't wait 3 minutes in between each iteration.. any idea?? Thanks in advance.
- Kyle
proc main
#include "pw5menu.inc"
integer Loops = 0
string ThisTime
long TimeNum,NextTimeNum
while (Loops++) < 200
ThisTime = $Time24
strsltime $DATE ThisTime TimeNum ;converts a date & time string to a long variable
NextTimeNum = TimeNum + 180 ;Waiting for 3 minutes
transmit " PRINT IMSKU IMDLS IMDLR XIMQMN XIMQOM XIMQOH XIMQOO XIMQAL XIMQTD XIMQB\"
pause 1
transmit "^M"
waitfor "->"
pause 1
transmit "WHERE IMSEQNUM<99999"
pause 1
transmit "^M"
waitfor "'T'erminal, 'P'rinter, or 'F'ile? "
transmit "F^M"
waitfor " File Name? "
transmit "QUANTITIES.TXT"
pause 1
transmit "^M"
waitfor "Q>"
waituntil NextTimeNum
endwhile
endproc