Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Malfunction $FAX... functions in vv 4.8

Status
Not open for further replies.

dickiedick

Programmer
Jan 13, 2003
2
NL
We use procomm to send faxes automaticaly, using a script to manage the fax queue.
Lately I tried to migrate from Win 95/procomm 3.0 to Win 2k/procomm 4.8. , using the convert utility for the script.
In the new configuration, the script reacts different.
I use the $FAXSENDCNT variable to detect whether the fax is finished sending (all faxes from the queue).
In the new config. the procedure enclosed below comes to an end though there are still faxes in the queue.
The (virtual) fax machine keeps sending faxes, while the script has ended.
Anybody had this prob before ?

proc Wait_To_Finish

integer i, iHv, iStatus, iMax_Tries, bTefaxen
string sFaxfile, sMsg
integer iYear, iMonth, iDay, iHour, iMin, iSec

iMax_Tries = 4
set fax retries iMax_Tries

strfmt sLog_Message "Aantal retries =%d" iMax_Tries
Logfile(sLog_Message)

Logfile("Geduld is een schone zaak...")
bTefaxen=$FAXSENDCNT
while bTefaxen
i=0
bTefaxen=0
while faxlist SCHEDULED i sFaxfile iHv
if iHv < iMax_Tries
bTefaxen++
endif
i++
pause 20
endwhile

faxstatus CURRENT iStatus sFaxfile sMsg
if iStatus > 0
strfmt sLog_Message &quot;Aantal nog te faxen=%d&quot; Tefaxen
Logfile(sLog_Message)
strfmt sLog_Message &quot;Laatste modemmelding=%s&quot; sMsg
Logfile(sLog_Message)
endif
endwhile

endproc

Thanx
 
I'm not at a machine with a fax modem at the moment, but it may be worthwhile to simplify the while loop so that is:

while $FAXSENDCNT
pause 20
faxstatus CURRENT iStatus sFaxfile sMsg
if iStatus > 0
strfmt sLog_Message &quot;Aantal nog te faxen=%d&quot; Tefaxen
Logfile(sLog_Message)
strfmt sLog_Message &quot;Laatste modemmelding=%s&quot; sMsg
Logfile(sLog_Message)
endif
endwhile

instead of setting the value of bTefaxen in the while loop. Once a script is scheduled to be sent, it needs no further monitoring by the script unless you want to make sure that all faxes are sent (which can be done by monitoring $FAXSENDCNT and looping until it is zero). aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top