Click here for a screen shot of the GUI in this script.



Addextender("WWWNT34I.DLL")

T1=DiskExist("h")

MyDialogFormat=`WWWDLGED,5.0`

MyDialogCaption=`Drive Map`
MyDialogX=57
MyDialogY=76
MyDialogWidth=230
MyDialogHeight=105
MyDialogNumControls=7

MyDialog01=`130,28,64,DEFAULT,EDITBOX,ID,""`
MyDialog02=`28,28,46,DEFAULT,STATICTEXT,DEFAULT,"Enter your user ID"`
MyDialog03=`130,50,64,DEFAULT,EDITBOX,BID,""`
MyDialog04=`28,50,98,DEFAULT,STATICTEXT,DEFAULT,"Enter building you work in. (Number only)"`
MyDialog05=`48,74,64,DEFAULT,PUSHBUTTON,DEFAULT,"Map Home Drive!",1`
MyDialog06=`120,74,64,DEFAULT,PUSHBUTTON,DEFAULT,"Exit",2`
MyDialog07=`80,4,64,DEFAULT,STATICTEXT,DEFAULT,"Home Drive Mapper"`

ButtonPushed=Dialog("MyDialog")


;If MyDialog05==1 then GoTo
BoxOpen("Drives","Checking Drives")
If T1 ==@True then wntCancelCon("h:",@TRUE,@TRUE)
Else if T1 ==@False then GoTo %BID%
goto %BID%
Endif

If wntGetCon("h:")=="" then
Message("Drive is not mapped","h:")
else
BoxText("Success, your home drive is mapped to H:")
Delay(2)
BoxShut()
Endif


:3450
wntAddDrive(@default,@default,"\\NTFS02\home\%ID%","h:",@False)
Return

:3380
wntAddDrive(@default,@default,"\\NTFS01\home\%ID%","h:",@False)
Return

:1145
wntAddDrive(@default,@default,"\\NTFS03\home\%ID%","h:",@False)
Return

:428
wntAddDrive(@default,@default,"\\NTFS04\home\%ID%","h:",@False)
Return