Jump to content

Remove text from saved variable?


Go to solution Solved by abberration,

Recommended Posts

Posted

I sure hope I worded my question correctly.

Basically I'm using

$test = ControlGetText("Space Left", "", "[CLASS:Static;INSTANCE:1]")

MsgBox("", "Uh", $test)

The MsgBox tells me: "Space left is: 50gb!"

Or however much space is remaining.

I'm trying to figure out how to make it type only the number (50gb) in another popup.

So I'm thinking logic-wise it'd be something like:

MsgBox("", "Uh2", $test - Space left is: ")

Then then it would popup only showing "50gb". I just have no clue how to do this. Any advice would be appreciated.

Posted

 

If the format of that titlebar never changes, you could use StringLeft & StringRight to trim portions of the statement. Example:

$test = "Space left is: 50gb!"
$test = StringRight($test, 5)
$test = StringLeft($test, 4)
MsgBox(0, "", $test)

This worked perfectly! Thank you!

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
  • Recently Browsing   0 members

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