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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Token Error when compiling ASPECT script

Status
Not open for further replies.

Faded

Programmer
Feb 6, 2002
78
CA
Hello,

I have been given the task of updating ASPECT scripts from DOS to Windows for Procomm Plus v.4.8. I have no experience in Aspect or Procomm Plus and am at a loss as to what is happening.

Below is the script that I am trying to run. I have re-named it to MERIDIAN.WAS from the DOS version MERIDIAN.ASP

proc main
transmit "AT\N1^M"
pause 1
dial "1 "
transmit "^R"
endproc

And this is the error that I get when Trying to compile.

MERIDIAN.WAS:
Error C020 Line 4: Invalid token: "1"
Error C022 Line 4: Missing token

Could this be related to improper configuration of the Connection Directory? Any other ideas or suggestions would be greatly appreciated.

Thanks,
Faded
 
The problem is due to the script not specifying what kind of connection (data, telnet, FTP, etc.) the entry in the Connection Directory is. Line 4 should look something like:

dial DATA "1 "

This assumes that you have a Connection Directory called "1 ". I don't have my DOS ASPECT manual handy, but I almost wonder if the original script didn't dial a 1 instead. I'll check the format of the old dial command when I get home later and let you know what I find out.
 
Hey Thanks!!

That was the ticket. I got a clean compile after the change. I now have the much larger scripts to work on, so I hope all goes well.

Cheers,
Faded
 
One thing you'll want to add after the dial command is:

while $DIALING
endwhile

This will keep your script from executing the transmit command while still in the dialing process.
 
Thanks again, I appreciate it. I'll add that now. Do you know of a good resource for ASPECT source code or examples online?
 
Unfortunately, there's not much in the way of online resources for ASPECT. About the only reference you'll be able to find is the ASPECT help file, which is pretty good and has examples for each command. Most of the scripts shipped with Procomm, with a couple exceptions, come with source code so you can take a look at those as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top