Lemures Posted September 2, 2010 Share Posted September 2, 2010 I have to write a small program for a class, and ultimately what I need it to do is to evaluate a user's function at certain values. The functions won't be terribly complex. For example, I want an InputBox to pop up, and the user would input, say, "3(x^2)-4x+6". Then my program would evaluate it at certain values (x=0, x=1, x=2, etc) and do something with the results. Is there an easy way to have the user input a string and have autoit convert it into a function that can be evaluated? Link to comment Share on other sites More sharing options...
JohnOne Posted September 2, 2010 Share Posted September 2, 2010 Eval() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Lemures Posted September 2, 2010 Author Share Posted September 2, 2010 Ah. I ended up using Execute(). I had forgotten that that existed. Thanks! Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 2, 2010 Share Posted September 2, 2010 (edited) http://www.codeproject.com/KB/recipes/MathieuMathParser.aspx This may be of interest to you. It's more robust and would be better in the long run to write a parser rather than rely on AutoIt's dynamic execution functions. Edited September 2, 2010 by Richard Robertson Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now