Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- display dialog "What mathematical method you want?" buttons {"Plus", "Minus", "Other"}
- if the button returned of the result is "Plus" then
- set One to text returned of (display dialog "First Numeral" default answer "" buttons {"OK"} default button 1)
- set two to text returned of (display dialog "Second Numeral" default answer "" buttons {"OK"})
- set three to One + two
- display dialog three buttons ("OK")
- else
- if the button returned of the result is "Minus" then
- set One to text returned of (display dialog "First Numeral" default answer "" buttons {"OK"})
- set two to text returned of (display dialog "Second Numeral" default answer "" buttons {"OK"})
- set three to One - two
- display dialog three buttons ("OK")
- else
- if the button returned of the result is "Other" then
- display dialog "What Other method you want?" buttons {"Multiply", "Divide"}
- if the button returned of the result is "Multiply" then
- set One to text returned of (display dialog "First Numeral" default answer "" buttons {"OK"})
- set two to text returned of (display dialog "Second Numeral" default answer "" buttons {"OK"})
- set three to One * two
- display dialog three buttons {"OK"}
- else
- if the button returned of the result is "Divide" then
- set One to text returned of (display dialog "First Numeral" default answer "" buttons {"OK"} default button 1)
- set two to text returned of (display dialog "Second Numeral" default answer "" buttons {"OK"})
- set three to One / two
- display dialog three buttons {"OK"}
- end if
- end if
- end if
- end if
- end if
- å
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement