|
通过条用子程序来完成。
0 d3 H; }) J7 }' o" @3 G! YN01:
* E2 v$ b4 i. Z( f. W1 w v3 [CALL/'COMPUTER',DME
- q4 e' {. q" u' RIF/DME==0,MESSG/'软件只允许在公司内部使用.'# @* `5 P4 ^$ _0 M
IF/DME==0,JUMP/TRM:
: l* v6 I& G' S7 Z6 x: I9 n7 o; ]0 b/ `9 {; I: ?8 v5 S
PROC/DME+ D1 W* R5 Y) D* }7 C9 R: g, y' w% a
NUMBER/STRLEN,ASCCOM(20),CHECK,QUEREN
8 G9 n6 d% j! s& C5 PSTRING/COMNAM(20),PASNM(100),PASS(1000,100),PATH(100)
+ R: j% V5 e- L- n; e$ J* d# yST1:
+ k0 {3 W; W5 F i8 v) wCOMNAM=ENVVAR/'UGS_LICENSE_SERVER',ASK,IFERR,ERR1:
, [* S8 }7 w8 q( \* M& m [PATH=ENVVAR/'UGII_USER_DIR',ASK,IFERR,ERR1:4 k/ u4 @4 _5 p
STRLEN=LENF(COMNAM); r4 u& q$ r( X; s
COMNAM=SUBSTR(COMNAM,7,STRLEN-6)
& ] V; X( _& A7 k: v" i9 m/ J4 r+ z! v5 n" E, q/ L' p% i/ B
DO/ST2:,I,1,STRLEN-6
9 n( Q- `: n0 I. S' z0 BASCCOM(I)=ASCII(COMNAM,I)
4 i8 W/ g7 v, z/ O8 G2 bIF/ASCCOM(I)>=97 AND ASCCOM(I)<=122,ASCCOM(I)=ASCCOM(I)-32
4 r2 ?4 ]' P5 }: dPASNM=PASNM+ISTR(ASCCOM(I)), b4 E5 S+ {& O) h
ST2:. o, W" h- ]9 g# M; i7 h
ST3:
9 B2 }+ ^; G: ^0 J+ hFETCH/TXT,1,PATH+'startup\LICENSE.DAT',IFERR,ERR2:4 P$ b0 f3 w, A1 ?. Q7 b4 g4 |
RESET/1
5 ? Q# ?- P8 N+ i ?% \
+ G* Z, K+ E: U. rDO/ST4:,I,1,1000& O2 ]: `1 {% F l' T6 H1 [
READ/1,IFEND,ST5:,PASS(I)
' `. F- u+ u! N8 Q! I" A6 ^" FCHECK=CMPSTR(PASNM,PASS(I))6 w8 a; [7 |% w6 T9 q
IF/CHECK==0,DME=1
7 _5 s! t% M B8 A' RST4:/ K+ C/ e% I9 ^
ST5:( }+ T' v: Z( \* [( G
FTERM/TXT,1
3 P# O+ R# q; JJUMP/TRM:
. O4 D* E, k; ?/ U5 U" R0 ~$ @" J
. f6 d o L% i8 D$ q: MERR1:* T( U( s k8 ^( q1 Y, j
MESSG/'请正确安装UG软件。'# p' B. Q* b2 |" a6 G& x
JUMP/TRM:: c5 @# f7 P g3 K: F7 s
ERR2:
+ |; Y$ A6 _2 ~5 N& nMESSG/'请先注册软件。' M. c" p Z6 }8 \
JUMP/TRM:
' w! W! m+ ^' S1 Z) ~
f3 I2 V) ~: S4 M8 c% WTRM:& z# s6 A' Z: J" C( f6 a
RETURN: T) q6 X4 F4 `+ \% k
. d' C& G/ o3 i0 r2 |) h |
|