ardel1

Calculation(s) from a single inputbox

3 posts in this topic

Hello, I am new to AutoIt and I am wondering something. Is it possible to enter a calculation (such as 5*3) in a single inputbox and calculate it?

For example:

$Calculation = InputBox( "Calculator", "Enter Your Calculation Here:", "", " M")

So basically I am asking if it is possible to get $Calculation as one number, or do something with it to make it one number (so if I would enter 3*5 it would change it into 15), in another variable of course.

 

~Ardel1

Share this post


Link to post
Share on other sites



of course yes.

$Calculation = InputBox( "Calculator", "Enter Your Calculation Here:", "", " M")
MsgBox(0,"",Execute($Calculation))


Saludos

1 person likes this

Share this post


Link to post
Share on other sites

Thank you very much!

I honestly expected it would be something that simple but I just couldn't find it.

Thanks again :)!

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