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!

Procomm Aspect

Status
Not open for further replies.

njjp

Technical User
Feb 18, 2004
5
US
I am trying to use Procom to

Place a call at a scheduled time

Send a <CtrlB>05,c

Receive a file

And hang up once the file transfer in compleate.



 
Here is something that should get you started. You will likely want to add a waitfor command after the transmit command to make sure that Procomm and the remote side are synched up before issuing the getfile command.

To get the script to run at a specific time, you can either schedule it using the Windows Scheduler, or run it manually and use the waituntil command to have the script pause until the correct time has been reached.

proc main
integer iStatus

dial DATA &quot;entryname&quot;
while $DIALING
yield
endwhile
if $CARRIER == 1
transmit &quot;^B05,c&quot;
getfile ZMODEM
iStatus = $XFERSTATUS
while iStatus == 1
iStatus = $XFERSTATUS
endwhile
if iStatus == 2
;Transfer successful, continue with script execution
elseif iStatus == 3
;Transfer failed, perform error handling
endif
hangup
endif
endproc


aspect@aspectscripting.com
 
Thanks for the info.

How do I enter a comand without sending a carriage return?
 
If you are asking how to send a carriage return so the transmit command sent by the script is acted on by the remot system, then add ^M to the end of the transmitted string (just before the closing double quote).


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top