Ok i made a function to find a default folder like this
I call it like this
When it uses the function _FindDefault() it never completes the reg key
Yet if i use this $sDefault = "D:\Code\Projects\" it works perfectly..
What did i miss?
Many thanks
I call it like this
[ autoit ]
[ autoit ]
Func _FindDefault() #region $sFindDefault Local $sDefault = "" $sDefault = FileSelectFolder("Choose a drive.", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") If @error = 1 Then ; User cancel or X close error check MsgBox(48, "Cancelled", "Cancelled By User", 4) $sDefault = "" EndIf If DriveSpaceTotal($sDefault) = 0 Then ; Drive contains no files error check MsgBox(48, "Source Error", "There Is No Data On That Drive", 4) $sDefault = "" EndIf Local $sDefaultEnd = StringRight($sDefault, 1) If $sDefaultEnd <> "\" Then $sDefault = $sDefault & "\" ;make sure backslash is on the end ConsoleWrite("Default = " & $sDefault & @CRLF) ;######## Checking ######## Return $sDefault #endregion EndFunc ;==>_FindDefault
When it uses the function _FindDefault() it never completes the reg key
Yet if i use this $sDefault = "D:\Code\Projects\" it works perfectly..
What did i miss?
Many thanks