olirav 0 Posted April 16, 2010 How can I get the drive that the script/exe is currebtly running from (Probably stupid question) Oli Share this post Link to post Share on other sites
kaotkbliss 146 Posted April 16, 2010 (edited) @ScriptDir *edit* if you just want the drive letter, you will have to trim everything else off as that macro gives the full path Edited April 16, 2010 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
l3ill 70 Posted April 16, 2010 Have a look at the Macro Reference/ Autoit related Macros: @ScriptDir My Contributions...SnippetBrowserNewSciTEPathFinderText File ManipulationFTP Connection Tester / INI File - Read, Write, Save & Load Example Share this post Link to post Share on other sites
olirav 0 Posted April 16, 2010 thanks for the quick responce, I am just trying it out Share this post Link to post Share on other sites
olirav 0 Posted April 16, 2010 (edited) Works great, new question now though, how can I trim it to only the drive letter, I've looked at StringTrim Left/Right but that wouln't do it. (Only a problem as the location can change, so cant use trim right.) oli Edited April 16, 2010 by olirav Share this post Link to post Share on other sites
kaotkbliss 146 Posted April 16, 2010 StringInStr, StringLeft, StringLen, StringLower, StringMid, StringRight, StringTrimLeft, StringTrimRight, StringUpper and StringSplit You won't need all of those, but there are many ways to do what you want, find a combination that works for you 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
l3ill 70 Posted April 16, 2010 (edited) Strings are new ground for me too so I tried this... $var = @ScriptDir $array = StringLeft($var, 1) ConsoleWrite("var=" & $var & @CRLF) ConsoleWrite("$array=" & $array & @CRLF) works nice and easy : Edited April 16, 2010 by billo My Contributions...SnippetBrowserNewSciTEPathFinderText File ManipulationFTP Connection Tester / INI File - Read, Write, Save & Load Example Share this post Link to post Share on other sites
olirav 0 Posted April 16, 2010 Strings are new ground for me too so I tried this... $var = @ScriptDir $array = StringLeft($var, 1) ConsoleWrite("var=" & $var & @CRLF) ConsoleWrite("$array=" & $array & @CRLF) Works Great thanks billo, and kaotkbliss also for your help oli Share this post Link to post Share on other sites