solid2005 Posted May 22, 2008 Share Posted May 22, 2008 (edited) CODEFunc GetRemAndFixedDrives() Local $RetErr = 0 Local $RetDrivesArr = DriveGetDrive("REMOVABLE") Else $RetDrivesArr = "a:" or $RetDrivesArr = "b:" Then ContinueLoop $DriveStatus = DriveStatus($RetDrivesArr) Else $DriveStatus = "NotReady" Then ContinueLoop If @error Then Local $RetDrivesArr[1] $RetErr = 1 EndIf Local $FixedDrivesArr = DriveGetDrive("FIXED") If @error And $RetErr Then Return SetError(1) Local $Ubound For $i = 1 To UBound($FixedDrivesArr)-1 $Ubound = UBound($RetDrivesArr) ReDim $RetDrivesArr[$Ubound+1] $RetDrivesArr[$Ubound] = $FixedDrivesArr[$i] Next $RetDrivesArr[0] = $Ubound Return $RetDrivesArr EndFunc Can Some One Fix This I get stuck when using this Script. Edited May 23, 2008 by solid2005 Link to comment Share on other sites More sharing options...
ChrisL Posted May 23, 2008 Share Posted May 23, 2008 (edited) What is this supposed to do? Did you write this or take it from somewhere else. As it is it will never work. Give us some information about what EXACTLY this should do and we might be able to help Edit: I think this is what your trying to do? #include <Array.au3> $aDrives= GetRemAndFixedDrives() _ArrayDisplay($aDrives) Func GetRemAndFixedDrives() Local $RetErr = 0 Local $ReMoveableDrivesArr = DriveGetDrive("REMOVABLE") Local $RetArray[1] For $i = 1 to UBound($ReMoveableDrivesArr) -1 If $ReMoveableDrivesArr[$i] = "a:" or $ReMoveableDrivesArr[$i] = "b:" Then ContinueLoop $DriveStatus = DriveStatus($ReMoveableDrivesArr[$i]) If $DriveStatus = "NotReady" Then ContinueLoop ReDim $RetArray[Ubound($RetArray) +1] $RetArray[Ubound($RetArray) -1] = $ReMoveableDrivesArr[$i] Next Local $FixedDrivesArr = DriveGetDrive("FIXED") For $i = 1 To UBound($FixedDrivesArr)-1 ReDim $RetArray[Ubound($RetArray) +1] $RetArray[Ubound($RetArray) -1] = $FixedDrivesArr[$i] Next $RetArray[0] = Ubound($RetArray)-1 IF $RetArray[0] = 0 then SetError(1) Return $RetArray EndFunc Edited May 23, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
solid2005 Posted May 23, 2008 Author Share Posted May 23, 2008 (edited) Thanks About This Edited May 23, 2008 by solid2005 Link to comment Share on other sites More sharing options...
ChrisL Posted May 23, 2008 Share Posted May 23, 2008 Replace the function in your code with the one I supplied above and see if that works [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now