
-----------------------------------
skier
Sun Nov 14, 2004 1:06 pm

mouse clicking
-----------------------------------
i am trying to amke a program so that when you click a botton on the mouse it makes a sound. i have got it working but it only works when you click in side the display window. is there a away to leave the program running but minimized and have it still work?

loop
    var x, y, radius, clr : int
    if Mouse.ButtonMoved ("down") then
        play ("b")      % a sharp in a lower octave
        var buttonnumber, buttonupdown : int
        Mouse.ButtonWait ("down", x, y, buttonnumber,
            buttonupdown)
    end if
end loop


-----------------------------------
Delos
Sun Nov 14, 2004 1:19 pm


-----------------------------------
Simply Window.Hide() the window.

Oh, and 'b' is not a#, b is cb.

-----------------------------------
skier
Sun Nov 14, 2004 1:33 pm


-----------------------------------
how do i no what the "window id" is

-----------------------------------
Delos
Sun Nov 14, 2004 5:47 pm


-----------------------------------
One of two things.

At the beginning of the programme, you can Window.Open() a new window...you'll need a variable for that so that variable will then hold the winID.

Or you can Window.GetActive the winID.  Amazing what happens when you press F10!

-----------------------------------
skier
Mon Nov 15, 2004 3:06 pm


-----------------------------------
then why does this not work.i dont here anything


loop
    Window.Hide (defWinID)
    var x, y : int
    if Mouse.ButtonMoved ("down") then
        play ("b")
        var buttonnumber, buttonupdown : int
        Mouse.ButtonWait ("down", x, y, buttonnumber,
            buttonupdown)
    end if

end loop


-----------------------------------
Delos
Mon Nov 15, 2004 3:20 pm


-----------------------------------
Try using just Mouse.Where(), it should work a bit better.

BTW, you might want to consider changing that "down" to "downup".

-----------------------------------
skier
Mon Nov 15, 2004 4:10 pm


-----------------------------------
The mouse.where command works much better thank you for your time
