Quick questoin using applescript

Hey, I’m Zac, and I’m only 13, so I’ve been having a little trouble with a script for applescript. I’m mixing

set apples to 0.5
set answer to text returned of (display dialog "Enter the amount of money you have (in dollars)" default answer "1")
display dialog answer & " dollar(s)=" & (answer * apples) & " apples"

with

set x to 6
set y to 10
get x + 25
get 80 / y
set xPlus25 to x + 25
set eighty_By_y to 80 / y
xPlus25 & eighty_By_y



basicly I’m trying to help this guy with math and I’m trying to make a box pop up so he can type in what x equals and a box that let’s him to type what he wants y to equal. and then a box that lets him type in the euquation and the answer will pop up. I quickly put a bit of the script together…but I don’t think it’s right

set x to text returned of (display dialog "Let X be:" default answer "1")
set y to text returned of (display dialog "Let Y be:" default answer "2")
get text returned of (display dialog "Pick a number to be added to x" default answer "3"), (display dialog with x) & " dollar(s)=" & (answer * apples) & " apples"

thanx in advanced.

zac

zac:

I am not completely sure I understand the question (I have not been 13 since 1975), but is this sort of script at least a nudge in the right direction?

set x to text returned of (display dialog "Let X be:" default answer "1") as number
set y to text returned of (display dialog "Let Y be:" default answer "2") as number

set z to text returned of (display dialog "OK, so if Y equals " & y & ",and X equals " & x & ", what number do you need add to X to reach Y?" default answer 0) as number
if (x + z) = y then
	set disp_Text to "Right On!"
else
	set disp_Text to "No, sorry.  The correct response is " & (y - x)
end if
display dialog disp_Text

[b]thanx for your help:) it’s in the right direction.:):slight_smile: thanx sooo much. :D:D

zac[/b]