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!

getver?

Status
Not open for further replies.

mntlfngrs

Technical User
Apr 13, 2002
36
US
Hello,

I was wondering if there is a command that will return the version of procomm that is runnig the script. The purpose it is for the script to issue connectmanual or dialnumber depending on the version of Procomm that it is run on.

Thanks,
Adam
"Be all and you'll be to end all.
Life can be a real ball.
State of mind!"
 
Adam, you were pretty close! The solution (at least in version 4.x of Procomm) is to check the contents of the $PWVER system variable. I don't have the ASPECT manuals for the older versions of Procomm at work, but I wouldn't be surprised if it is the same system variable in older Windows versions of the program as well.
 
knob,

So i'm playing around with that using...

;**********************************************
string spver

proc main

substr spver $pwver 0 9
usermsg "%d" $pwver
usermsg "%d" spver

endproc
;*********************************************

And I seem to get different values almost every time.
Not just between the two usermsg commands, but even from one run to the next. how can this be?

Adam "Be all and you'll be to end all.
Life can be a real ball.
State of mind!"
 
You are seeing this because the %d is used with integer values while you need to use the %s format variable to output in string format. Once I made that change, I was getting the expected result of 5.00 for version 4.8 (odd, I know, but that's what Symantec made the internal version number). FYI, you can assign $PWVER to spver just by using:

spver = $PWVER
 
Thanks knob. obvious mistakes on my part. "Be all and you'll be to end all.
Life can be a real ball.
State of mind!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top