Jump to content
ardel1

Calculation(s) from a single inputbox

Recommended Posts

ardel1

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
Danyfirex

of course yes.

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


Saludos

  • Like 1

Share this post


Link to post
Share on other sites
ardel1

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.