Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
chmod help (permissions)
#3

sure thing... tell ya what.. I'll add the source to the zip file... plus, i'll post the a VB form in here.

 

' chmodhelper.exe '



Code:
Option Explicit
Private Sub cmdChmod_Click()
Dim rootSum, rr, rw, re As Byte
Dim userSum, ur, uw, ue As Byte
Dim worldSum, wr, ww, we As Byte

rootSum = 0
rr = 0
rw = 0
re = 0

userSum = 0
ur = 0
uw = 0
ue = 0

worldSum = 0
wr = 0
ww = 0
we = 0

If chkRootR.Value = 1 Then
rr = 4
Else: rr = 0
End If
If chkRootW.Value = 1 Then
rw = 2
Else: rw = 0
End If
If chkRootE.Value = 1 Then
re = 1
Else: re = 0
End If

If chkUserR.Value = 1 Then
ur = 4
Else: ur = 0
End If
If chkUserW.Value = 1 Then
uw = 2
Else: uw = 0
End If
If chkUserE.Value = 1 Then
ue = 1
Else: ue = 0
End If

If chkWorldR.Value = 1 Then
wr = 4
Else: wr = 0
End If
If chkWorldW.Value = 1 Then
ww = 2
Else: ww = 0
End If
If chkWorldE.Value = 1 Then
we = 1
Else: we = 0
End If

rootSum = rootSum + rr + rw + re
userSum = userSum + ur + uw + ue
worldSum = worldSum + wr + ww + we

lblRootOP.Caption = rootSum
lblUserOP.Caption = userSum
lblWorldOP.Caption = worldSum
End Sub

Private Sub cmdClear_Click()
chkRootR.Value = 0
chkRootW.Value = 0
chkRootE.Value = 0
chkUserR.Value = 0
chkUserW.Value = 0
chkUserE.Value = 0
chkWorldR.Value = 0
chkWorldW.Value = 0
chkWorldE.Value = 0

lblRootOP.Caption = "0"
lblUserOP.Caption = "0"
lblWorldOP.Caption = "0"

End Sub

Private Sub cmdClose_Click()
End
End Sub




 

 

I could have used a case statement instead all of those IF statements.. I'm still learning VB. :/

 

morbondu

~http://www.grithouse.com~

Reply


Messages In This Thread
chmod help (permissions) - by morbondu - 2003-12-11, 11:54 PM
chmod help (permissions) - by anyweb - 2003-12-12, 07:36 AM
chmod help (permissions) - by morbondu - 2003-12-12, 11:18 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)