Jump to content
Sign in to follow this  

annoying Number() function

Recommended Posts


I am trying to write a script which uses the number() function.

Basically, the program is supposed grab the clipboard, which will already have a mathematical expression (e.g "5 + 5") and then solve it and send() the answer.

This is what I have so far:




However, because the expression in the clipboard is read as a string, the number function isn't solving the expression.

Instead, when I have an expression like "256 - 4", it would simply output "256" as it reads it as a string and cuts everything after the sign.

Any hints on how to solve this problem?

Share this post

Link to post
Share on other sites

Try using Execute instead:



Doh, cppman beat me too it. :)

Edited by FreeFry

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  


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.