given the line "Command [TL=00:00:00]:[1234] (?=Help)? :", here is a start:
Code:
call zocwait "Command ["
call zocwait "]:["
call zocwait "]"
sector = zoclastline()
the above will give you sector = "1234]" because zoclastline() gives you everything from the current line or the latest zocwait. the following code is an improvement because it strips out the "]".
Code:
call zocwait "Command ["
call zocwait "]:["
call zocwait "]"
parse value zoclastline() with sector "]"
the above will give you sector = "1234". you can refine more by handling the return values from the zocwait calls. zocwait will return the number 640 on a timeout. you can define the timeout period in seconds with the zoctimeout function.
Code:
call zoctimeout 60
if zocwait("Command [") = 640 then exit
if zocwait("]:[") = 640 then exit
if zocwait("]") = 640 then exit
parse value zoclastline() with sector "]"