I have written a script that automaticaly adapts the parity, databits and stopbits and it works fine but when I execute this script from another script, it fails.
Are you saying if you launch your script from another script using the execute command that the script (which worked fine in a standalone mode) does not work correctly now? I haven't had a chance to play around with this problem yet (no modem on my work machine), but have you tried using execute "script_name" SHARED instead to see if that works correctly?
It seems that procomm does accept the change eg when working on 8-N-1 and it detects 7-M-1, in the quick select line it stays on 8-N-1 but when you click on it, it shows 7-M-1.
I tried the SHARED thing, but it didn't solve the problem.
Can you post the contents of the script you are executing? I played around with this a little tonight and didn't see the problem, but I may be doing something differently. Are you using a modem or direct connection? Are you enabling modem command mode at some point (either manually or via your script)?
The first script is writtten to dial all the entries in a given dialing directory, automatically log into the system (2nd script) and finaly execute a 3rd (free to select) script once the connection is established and logged into the system. I also built in a sort of schedule capability into the first one!
First script:
#define empty(a) if nullstr a
#define errmsg1 usermsg "Please fill out all fields!"
#define rust mspause 50
integer BOX0 ;Dialog box
integer NB_DIR ;Number of directories
integer NB_CUST = 0 ;Number of customers in dialdir
integer i, k = 1 ;Tellers
integer ERRCODE = 0
integer ID, RETVAL
long TIJD, TIMEVAL1, TIMEVAL2
string exeDATE, exeTIME
string CHOICE = "Execute Now,Scheduled"
string EXEC ;Choice : Shedule script YES/NO
string IPC_ID ;IPC user ID to use
string IPC_PASS ;IPC Password to use
string NB_DIRS
string DIR_NAME [5] ;Dialing directory names
string CUST_NAME = ""
string CUST_PHONE = ""
string SCRIPT ;Scriptname to launge
string SUMMARY = "c:\copy\temp\Modemlog.txt"
string _MODEM = "c:\program files\symantec\procomm plus\aspect\Login.wax"
string DIR_PATH
string ZONE, TEL
string REPERTOIRE = "Failed.dir"
proc main
set txpace 150
call INPUT
S0 = IPC_ID
S1 = IPC_PASS
i = 1
if not isfile REPERTOIRE
dialcreate REPERTOIRE
endif
if strcmp "Scheduled" EXEC
waituntil exeTIME exeDATE
endif
for i upto NB_DIR
dialload DIR_NAME
dialcount DATA NB_CUST
for k = 0 upto NB_CUST-1
termreset
s2 = ""
s3 = ""
s4 = ""
s5 = ""
s6 = ""
s7 = ""
s8 = ""
s9 = ""
ERRCODE = 0
i0 = 0
pause 1
dialname DATA k CUST_NAME
set dialentry access DATA CUST_NAME
fetch dialentry areacode ZONE
fetch dialentry phonenumber TEL
dial DATA CUST_NAME
TIJD = $LTIME+105
strupr S0
strupr S1
if nullstr $USERID
pause 3
dialcancel current
ERRCODE = 5
goto PROCEED
endif
if nullstr $PASSWORD
pause 3
dialcancel current
ERRCODE = 5
goto PROCEED
endif
while 1
switch $carrier
case 0
if $LTIME >= TIJD
ERRCODE = 1
dialcancel current
goto PROCEED
endif
endcase
case 1
exitwhile
endcase
endswitch
endwhile
while 1
switch ERRCODE
case 0
exitwhile
endcase
case 5
hangup
goto proceed
endcase
endswitch
endwhile
pause 1
execute _MODEM
ERRCODE = i0
if ERRCODE != 0
goto proceed
endif
mspause 250
execute SCRIPT
ERRCODE = i0
if ERRCODE != 0
goto proceed
endif
pause 1
transmit "****^M"
rust
transmit "LOGO^M"
pause 2
set txpace 0
termreset
hangup
proceed:
pause 1
call _SUM
pause 1
endfor
endfor
Just so I understand your problem, it appears that the switch to 7M1 is successful, but the Quick Select Line at the bottom still reads 8N1 until you click on the cell? I tried this on my setup a bit today and I always saw the switch to 7M1 when one of the string in my when target commands was received by Procomm.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.