
-----------------------------------
Evilkilla
Wed Jun 02, 2004 1:21 pm

Calculator
-----------------------------------
cannot use more than one operator, tan does not work, and decimal , backspace

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Pic.ScreenLoad ("calc.jpg", 0, 0, picCopy) %loads calulator image
var a, d : string := ""
var b, c, total : real
var switch : boolean := false
var operator : int
var x, y, button : int
var font1 : int := Font.New ("serif:12")


Mouse.ButtonChoose ("multibutton")
var button2, left, middle, right : int
var output : string
Mouse.Where (x, y, button)
left := button mod 10                   % left = 0 or 1
middle := (button - left) mod 100           % middle = 0 or 10
right := button - middle - left             % right = 0 or 100h

loop
    Mouse.Where (x, y, button)
    Text.Locate (1, 1)
    if button = 0 then
        put x : 4, "  ", y : 4, "  button up"
    else
        put x : 4, "  ", y : 4, "  button down"
    end if

    %%%%%%%%%%%%%%%
    %Button choose%
    %%%%%%%%%%%%%%%



    locatexy (27, 190)
    %button x squared
    if x >= 11 and x = 83 and y = 51 and x = 83 and y = 89 and x = 83 and y = 127 and x = 83 and y = 165 and x = 83 and y = 204 and x = 83 and y = 241 and x = 83 and y = 279 and x = 83 and y = 316 and x = 83 and y = 8 and x = 47 and y = 50 and x = 47 and y = 91 and x = 47 and y = 128 and x = 47 and y = 164 and x = 47 and y = 202 and x = 47 and y = 241 and x = 47 and y = 279 and x = 47 and y = 316 and x = 47 and y = 65 and x = 9 and y = 115 and x = 9 and y = 162 and x = 9 and y = 205 and x = 9 and y = 242 and x = 9 and y = 280 and x = 9 and y = 317 and x = 9 and y 