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!

how to run dos command from ASPECT script

Status
Not open for further replies.

nguyenb9

Technical User
Apr 1, 2003
55
US
I have a dos file called "convert.exe", I would like to execute this from Aspect script and add this to the end of my script. For example, this is how I run the convert.exe from DOS level;
DOS> convert.exe filename

This is my script,and it works. I would like to this script:

#define PhoneNum "9714231234"
#define MicsFile "c:\programs files\symantec\procomm plus\upload\logixa"
#define OutFile "c:\programs files\symantec\procomm plus\download\logix.0728.dat.test"
proc main
dialnumber DATA PhoneNum
while $dialing
endwhile
if !$CARRIER
usermsg "Unable to connect to Southwest Bank server. Please try again later."
exit
endif
if FAILURE
usermsg "Unable to connect to Mics server. Please try again later."
hangup ;hangs up the phone line
pause 2 ;waits two seconds
pwexit ;Close Procomm Plus.
else
transmit "U"
waitfor "choice?"
pause 1
transmit "Z"
waitfor "file name?"
pause 1
transmit "LOGIXA^M"
pause 1
sendfile ZMODEM "LOGIXA"
endif
endproc


Thank you for your help!
 
Add this to the beginning of your script (just after proc main):

integer iStatus
string sFileName
string sCmdLine

Then add these lines after the sendfile command:

iStatus = $XFERSTATUS
sFileName = $XFERFILE
while iStatus == 1
yield
iStatus = $XFERSTATUS
endwhile
if iStatus == 2
strfmt sCmdLine "run %s" sFileName
run sCmdLine
endif


aspect@aspectscripting.com
 
Thanks for your respond. what you are giving me didn't show the "convert.exe filename" from aspect script. For example, when I in the DOS level, I run this command "convert.exe filename" and it run fine, and I want to do this from ASPECT script. If you can provide some sample I would appreciated.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top