Computer Science Canada

window problem

Author:  spencerbr [ Sat Dec 09, 2006 3:02 pm ]
Post subject:  window problem

doesn't load when you click for insertion point
code:

    % Load
    if x >= 55 and x <= 95 and y >= 345 and y <= 385 and button = 1 then
        var winID3 : int
        delay (500)
        winID3 := Window.Open ("position:center;center,graphics:200;100")
        locate (1, 1)
        put "Load : Enter File Name"
        get file
        delay (100)
        locate (1, 1)
        put "Click on insertion point"
        delay (500)
        Window.Hide (winID3)
        mousewhere (x, y, button)
        if button = 1 and y >= 20 and x >= 100 then
            Pic.ScreenLoad (file + ".bmp", x, y, picCopy)
        end if
        delay (500)
        Window.Close (winID3)
    end if

Author:  Tony [ Sat Dec 09, 2006 3:10 pm ]
Post subject: 

sure it does, it's just that
code:

        put "Click on insertion point"
        delay (500)
        Window.Hide (winID3)
        mousewhere (x, y, button)
        if button = 1 and y >= 20 and x >= 100 then

There's just 0.5 of a second between seeing "click on" and checking once if the button has been pressed.

You need a loop in there

Author:  spencerbr [ Sat Dec 09, 2006 4:30 pm ]
Post subject: 

ok, thx, it works now

Author:  spencerbr [ Sat Dec 09, 2006 4:40 pm ]
Post subject: 

its still messed up... it gives .5 seconds to click but on the wrong window

Author:  McKenzie [ Sat Dec 09, 2006 9:22 pm ]
Post subject: 

What exactly do you want it to do?


: