|
通过条用子程序来完成。8 M/ T) |/ j; }( ?5 i! \- w
N01:) Q3 F3 C3 k$ ~0 |, {
CALL/'COMPUTER',DME
: S$ \! ]6 H4 c8 y3 RIF/DME==0,MESSG/'软件只允许在公司内部使用.'' T! t2 ]( {8 ]
IF/DME==0,JUMP/TRM:
/ q$ b9 D8 q' ]% d5 a# ?/ ^+ x* D7 P$ Z; B% Z/ N
PROC/DME
9 }) ~; `* M6 p( T6 n1 xNUMBER/STRLEN,ASCCOM(20),CHECK,QUEREN
/ q! G+ d; |0 h2 Z/ O7 t, u# tSTRING/COMNAM(20),PASNM(100),PASS(1000,100),PATH(100); w. ^; b: O3 l/ V
ST1:
4 _5 e' r$ B, d* K) M6 f- aCOMNAM=ENVVAR/'UGS_LICENSE_SERVER',ASK,IFERR,ERR1:$ o$ b8 p }' Q+ a' V
PATH=ENVVAR/'UGII_USER_DIR',ASK,IFERR,ERR1:( v# F0 W& i" ?3 a9 g! i
STRLEN=LENF(COMNAM)1 R! K/ w8 ?+ j9 F3 A( m
COMNAM=SUBSTR(COMNAM,7,STRLEN-6)9 H! S a/ ~0 W# t
; v- v0 k% }% q3 BDO/ST2:,I,1,STRLEN-6$ `( G- L6 N4 E2 e c' D
ASCCOM(I)=ASCII(COMNAM,I)
: K+ C: U2 |1 M, V( xIF/ASCCOM(I)>=97 AND ASCCOM(I)<=122,ASCCOM(I)=ASCCOM(I)-323 \% h4 B- L' G+ G& X1 Y4 I
PASNM=PASNM+ISTR(ASCCOM(I))0 g) T6 P! r L% A$ e
ST2:" @4 Z4 y* o/ |. u
ST3:
3 y/ h: t8 V i8 E" L/ q y. w7 B( W: lFETCH/TXT,1,PATH+'startup\LICENSE.DAT',IFERR,ERR2:1 W( J) D; n- R7 m, {
RESET/13 n1 C8 H& [$ h; E& y5 Y
7 v# ~! x4 K: }9 Z+ q2 Y1 tDO/ST4:,I,1,10003 G) t/ j/ s( g, \
READ/1,IFEND,ST5:,PASS(I)
: A+ p4 \; P6 w" r- ]! B3 V& LCHECK=CMPSTR(PASNM,PASS(I))
+ s; y0 P" q1 j7 G0 r% k- f' L& dIF/CHECK==0,DME=1
4 l3 X& B; D! p" GST4:2 U* f0 D; y. P8 s F
ST5:/ @( f! T; A' g
FTERM/TXT,1
! O9 t- \' s3 g9 d4 U" [# y* z4 ]JUMP/TRM:# V I5 F( I8 V% j( O b
9 v2 i) ^0 Q) {! j7 H' s+ `6 yERR1:
/ H+ }5 [6 `7 {, PMESSG/'请正确安装UG软件。'
( k, I3 ~* ? W9 DJUMP/TRM:
& Y" @; S F& l/ e4 O( q% p! RERR2:0 c* S, o& c$ D
MESSG/'请先注册软件。'
) w; E5 V; Y. O$ y# T- N+ n/ xJUMP/TRM:
4 f1 \! O7 S$ w* w8 p1 R2 N
2 Y" q- `2 g' C, h' M- [3 N& NTRM:
0 b. |6 w( \; L! lRETURN
8 C, ^1 S6 o+ _, y" _! Y& T* G1 N/ e& v
|
|