DeeRiee Posted September 23, 2008 Share Posted September 23, 2008 Hello, i'm new here I'm trying to remove this "\" from return of file select folder... I'm try this $folder=FileSelectFolder("Select","") MsgBox(0,"Return",$folder) If i select folder or subfolder the return D:\My Folder\Sub Folder <--Nothing slash at the end >_< If I select a Drive the return being D:\ <--slash at the end How Can? So, i need help how to remove that slash using StringSplit() Because i'm newbie, i'm not understanding StringSplit() in help file... Sorry 4 bad english, i'm indonesian Link to comment Share on other sites More sharing options...
Andreik Posted September 23, 2008 Share Posted September 23, 2008 Hello, i'm new here I'm trying to remove this "\" from return of file select folder... I'm try this $folder=FileSelectFolder("Select","") MsgBox(0,"Return",$folder) If i select folder or subfolder the return D:\My Folder\Sub Folder <--Nothing slash at the end >_< If I select a Drive the return being D:\ <--slash at the end How Can? So, i need help how to remove that slash using StringSplit() Because i'm newbie, i'm not understanding StringSplit() in help file... Sorry 4 bad english, i'm indonesian I don't think that is any problem if is D:\\ Anyway: $FOLDER = FileSelectFolder("SELECT","") If StringLen($FOLDER) = 3 Then $FOLDER = StringLeft($FOLDER,2) EndIf When the words fail... music speaks. Link to comment Share on other sites More sharing options...
DeeRiee Posted September 23, 2008 Author Share Posted September 23, 2008 I don't think that is any problem if is D:\\ Anyway: $FOLDER = FileSelectFolder("SELECT","") If StringLen($FOLDER) = 3 Then $FOLDER = StringLeft($FOLDER,2) EndIf Thanks... But... i want to learn more about String Function, where i can learn more and easier, because i'm not understanding the help file example and explanation about String, it's so hard >_< Where i can learn more? Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 23, 2008 Share Posted September 23, 2008 Did you go through the "Autoit 1-2-3" tutorial? That's a good place to start. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Andreik Posted September 23, 2008 Share Posted September 23, 2008 (edited) Thanks... But... i want to learn more about String Function, where i can learn more and easier, because i'm not understanding the help file example and explanation about String, it's so hard Where i can learn more? I write for you an example with StringSplit(): $FOLDER = FileSelectFolder("SELECT","") $SPLIT = StringSplit($FOLDER,"\") If $SPLIT[2] = "" Then MsgBox(0,"","You select disk drive " & $SPLIT[1]) Else MsgBox(0,"","You select a folder from drive " & $SPLIT[1] & @CRLF & $FOLDER) EndIf More about String functions in help file. >_< Edited September 23, 2008 by Andreik When the words fail... music speaks. 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