Sign in to follow this  
Followers 0
BitOfHope

Remove text from saved variable?

3 posts in this topic

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.

Share this post


Link to post
Share on other sites



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)

RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

Share this post


Link to post
Share on other sites

 

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!

Share this post


Link to post
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
Sign in to follow this  
Followers 0