Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

[AppleScript]How to display a int and not a string (I want to display the result of the equation and not the proper equation)

I want to display(example) 12 instead of "(6+6)*2+12/3" the problematic part is:



on buttonGo_(aNotification)

display dialog"X = "default answer""

set equation to text returned of result as integer

display dialog(equation)

end buttonGo_


What can I do to fix it?

Mac mini

Posted on Jan 8, 2014 3:40 PM

Reply
Question marked as Best reply

Posted on Jan 8, 2014 3:44 PM

Here:


display dialog "X = " default answer ""

set equation to run script (text returned of result)

display dialog (equation)


Note that you need to put a second set of brackets around everything before the /3 to get 12 as the result.


(97358)

2 replies

[AppleScript]How to display a int and not a string (I want to display the result of the equation and not the proper equation)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.