/* REXX (CREATED BY ZHAROUS) */ CR= X2C(0D) /* carriage return */ LF= X2C(0A) /* line feed */ CALL ZocTimeout 6000 CALL ZocWaitForSeq 1 CALL ZocRespond "[ Pause ]", " " CALL ZocRespond "*** End of Report ***", " " answer= ZocAsk("Go to what sector? ") Call ZocSend "c;3;" answer "^M" ZocWait("Working. The shortest ") CALL ZocReceiveBuf 40 ZocWait(":") header= ZocReceiveBuf(0) PARSE VALUE header WITH ."from sector "from . PARSE VALUE header WITH ."to sector "to . CALL ZocReceiveBuf 2048 ZocWait("Course will") data= ZocReceiveBuf(0) --SAY "[[" data "]]" ZocWait "Enter course into autopilot? (Y/[N])" ZocSend "n;1;s" ZocWait "Main Command (?=Help)?" ZocWait "Main Command (?=Help)?" howmany= ZocString("PARTCOUNT", data, CR) linecnt= 0 DO i= 3 TO howmany-2 /* get the i'th line and strip possibly lingering CR/LFs */ line= ZocString("PART", data, i, CR) line= STRIP(line, 'B', CR) line= STRIP(line, 'B', LF) --SAY i line /* put it into an array (lines) */ linecnt= linecnt+1 lines.linecnt= line /* lines[linecnt]= line */ END lines.0= linecnt lines.1 = substr(lines.1,length(from)+3) --SAY length(from) DO i= 1 TO lines.0 line= lines.i --SAY i line count= ZocString("PARTCOUNT", line, ",") DO j=1 TO count sector= ZocString("PART", line, j, ",") ZocSend "m;"||sector||";s^M" ZocWait "Main Command (?=Help)?" ZocWait "Main Command (?=Help)?" END END