autoit question

11/12/2012 13:11 schmuselord1#1
hiho.

Code:
	  Case $msg = $selectpath
		 $spath = FileSelectFolder("Choose a folder.", "")
		 If $spath <> "No log-folder selected." And $spath <> "" Then 
			If $spath <> "*:\" Then
			   GUICtrlSetData($tpath, $spath & "\")
			Else
			   GUICtrlSetData($tpath, $spath)
			EndIf
		 Else 
			GUICtrlSetData($tpath, "No log-folder selected.")
		 EndIf
it actually works. it only has the problem that it adds a "\" when im on "C:\"
or "D:\", so i have "C:\\" selected.. is there any way to to make the "*:" filter working?

thanks in advance
11/12/2012 14:18 Achat#2
Code:
		 $spath = FileSelectFolder("Choose a folder.", "")
		 If $spath <> "No log-folder selected." And $spath <> "" Then
			If $spath <> "*:\" Then
			   GUICtrlSetData($tpath, StringReplace($spath & "\",'\\','\'))
			Else
			   GUICtrlSetData($tpath, $spath)
			EndIf
		 Else
			GUICtrlSetData($tpath, "No log-folder selected.")
		EndIf
Rgds
11/12/2012 14:41 schmuselord1#3
Quote:
Originally Posted by Achat View Post
Code:
		 $spath = FileSelectFolder("Choose a folder.", "")
		 If $spath <> "No log-folder selected." And $spath <> "" Then
			If $spath <> "*:\" Then
			   GUICtrlSetData($tpath, StringReplace($spath & "\",'\\','\'))
			Else
			   GUICtrlSetData($tpath, $spath)
			EndIf
		 Else
			GUICtrlSetData($tpath, "No log-folder selected.")
		EndIf
Rgds
thanks!

new code:
Code:
		 $spath = FileSelectFolder("Choose a folder.", "")
		 If $spath <> "No log-folder selected." And $spath <> "" Then
			GUICtrlSetData($tpath, StringReplace($spath & "\",'\\','\'))
		 Else
			GUICtrlSetData($tpath, "No log-folder selected.")
		EndIf
but why was $spath == "*:\" , no matter what happened?

btw: is there a difference between " and ' ? their effect should be completely the same.
11/12/2012 19:44 Logtetsch#4
"" = string
'' = character

Example:
"That's a simple string"
'A'