|
例一、FORM命令,只列出可写磁盘列表(排除X:盘与Y:盘)
——————————————————————————————————————————————
_SUB Loop
FORM DriveType=%AllDrive%
LSTR aStr=%AllDrive%,2
FIND $%aStr%=X:,!FIND $%aStr%=Y:,!FIND $%DriveType%=DRIVE_CDROM,!ENVI RDrive=%RDrive%|%aStr%
MSTR AllDrive=%AllDrive%,4,0
STRL iLen=%AllDrive%
IFEX $%iLen%>0,CALL Loop!MSTR RDrive=%RDrive%,2,0
_END
ENVI RDrive=
FDRV AllDrive=
MESS %AllDrive%@所有盘符列表#OK
CALL Loop
MESS %RDrive%@可写盘符列表#OK
——————————————————————————————————————————————
例二、FORM命令实际应用(只列出可写磁盘盘符,并默认选中初始盘符为搜索到的第二可写磁盘盘符)
——————————————————————————————————————————————
_SUB Loop
FORM DriveType=%AllDrive%
LSTR aStr=%AllDrive%,2
FIND $%aStr%=X:,!FIND $%aStr%=Y:,!FIND $%DriveType%=DRIVE_CDROM,!ENVI RDrive=%RDrive%|%aStr%
MSTR AllDrive=%AllDrive%,4,0
STRL iLen=%AllDrive%
IFEX $%iLen%>0,CALL Loop!MSTR RDrive=%RDrive%,2,0
_END
_SUB windows1,w316h70,FORM实际应用,
labe label5,l25t15w220h20,04.请设定外置程序存放的分区:
ENVI RDrive=
FDRV AllDrive=
CALL Loop
MSTR MDrive=%RDrive%,4,0
LSTR MDrive=%MDrive%,2
LIST OPD,l203t10w60h30,%RDrive%,,%MDrive%
_END
CALL @WINDOWS1
——————————————————————————————————————————————
[ 本帖最后由 网虫2008 于 2010-3-11 15:00 编辑 ] |
|