Jump to content

Simple question (Get running location)


Recommended Posts

@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 by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

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 by olirav
Link to comment
Share on other sites

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 :(

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

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 by billo
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...