
-----------------------------------
frank26080115
Mon Oct 16, 2006 5:09 pm

issue with mouse unfocusing window
-----------------------------------
ok this should write "test" into the bottom window when you click inside the top window, and it works most of the time, but if you click out side the window and then click inside the window, nothing happens, and i don't know what's wrong with it because im telling it "window:select" "window:setactive" and "window:show" every step of the way

%variables
var buttonwindow : int
var textwindow : int

%based on screen resolution
var screenwidth : int := 1000
var screenheight : int := 200
var screenwidthtext : int := screenwidth div 8
var screenheighttext : int := screenheight div 7

var displayline : string

%mouse position and button up/down
var mousex : int := 0
var mousey : int := 0
var mousebutton : int := 0

%var  :  :=

%procedures

%to make sure this window stays on top
procedure showwin1
    Window.Select (buttonwindow)
    Window.SetActive (buttonwindow)
    Window.Show (buttonwindow)
end showwin1

%to make sure this window stays on top
procedure showwin2
    Window.Select (textwindow)
    %Window.SetActive (textwindow)
    Window.Show (textwindow)
end showwin2

%opens windows
buttonwindow := Window.Open ("position:center;top,graphics:" + intstr (screenwidth) + ";" + intstr (screenheight) + ",buttonbar")
textwindow := Window.Open ("position:center;bottom,text:" + intstr (screenheighttext) + ";" + intstr (screenwidthtext) + ",buttonbar,title:Source Code")

%Intro Line, will be shown as a comment in Basic
put ";Source Code Written With the Basic Atom Writer by Frank26080115"

%put a "write to file" script here

loop
    showwin1
    loop
        showwin1
        Mouse.Where (mousex, mousey, mousebutton)
        %Choose Syntax

        %this part is to be writen, will consist of buttons

        exit when mousebutton = 1
    end loop
    loop
        showwin1
        Mouse.Where (mousex, mousey, mousebutton)
        %Exit when mouse button is let go
        exit when mousebutton = 0
    end loop
    loop
        showwin1

        %only exit if within screen
        if mousex >= 0 and mousex = 0 and mousey 