hardybacon
Technical User
Sorry, the original thread was closed. Here is the upload file with a couple of modifications to shorten the timeout for codes that are already present, logout and stop the script when it is done running.
The original scripting is from bignose21 & jamie2. Thank you both.
CALL ZocSend "****^M"
CALL ZocDelay 0.5
CALL ZocSend "LD 88^M"
CALL ZocWait "REQ "
CALL ZocDelay 0.5
CALL ZocSend "new^M"
CALL ZocWait "TYPE"
CALL ZocDelay 0.5
CALL ZocSend "aut^M"
CALL ZocWait "CUST"
CALL ZocDelay 0.5
CALL ZocSend "0^M"
CALL ZocWait "SPWD"
CALL ZocDelay 0.5
CALL ZocSend "0000^M"
file = "C:\AUTH\Adds.txt"
LOOP:
data=LINEIN(file)
Parse Var data v1
IF v1 = "" THEN CALL finish
CALL ZocWait "CODE"
CALL ZocDelay 0.5
CALL ZocSend v1
CALL ZocSend "^M"
Call ZocTimeout 2
v2 = ZocWaitMux("CODE", "SARC")
SELECT
WHEN v2=0 THEN CALL LOOP
WHEN v2=1 THEN NEXT
WHEN v2=640 THEN CALL finish
OTHERWISE END
NEXT:
CALL ZocDelay 0.5
CALL ZocSend "no^M"
CALL ZocWait "CLAS"
CALL ZocDelay 0.5
CALL ZocSend "5^M"
CALL LOOP
finish:
Call ZocWait 0.5
Call ZocSend "^M"
CALL ZocSend "****^M"
Call ZocSend "logo^M"
Exit
The original scripting is from bignose21 & jamie2. Thank you both.
CALL ZocSend "****^M"
CALL ZocDelay 0.5
CALL ZocSend "LD 88^M"
CALL ZocWait "REQ "
CALL ZocDelay 0.5
CALL ZocSend "new^M"
CALL ZocWait "TYPE"
CALL ZocDelay 0.5
CALL ZocSend "aut^M"
CALL ZocWait "CUST"
CALL ZocDelay 0.5
CALL ZocSend "0^M"
CALL ZocWait "SPWD"
CALL ZocDelay 0.5
CALL ZocSend "0000^M"
file = "C:\AUTH\Adds.txt"
LOOP:
data=LINEIN(file)
Parse Var data v1
IF v1 = "" THEN CALL finish
CALL ZocWait "CODE"
CALL ZocDelay 0.5
CALL ZocSend v1
CALL ZocSend "^M"
Call ZocTimeout 2
v2 = ZocWaitMux("CODE", "SARC")
SELECT
WHEN v2=0 THEN CALL LOOP
WHEN v2=1 THEN NEXT
WHEN v2=640 THEN CALL finish
OTHERWISE END
NEXT:
CALL ZocDelay 0.5
CALL ZocSend "no^M"
CALL ZocWait "CLAS"
CALL ZocDelay 0.5
CALL ZocSend "5^M"
CALL LOOP
finish:
Call ZocWait 0.5
Call ZocSend "^M"
CALL ZocSend "****^M"
Call ZocSend "logo^M"
Exit