mouse clicking
Author |
Message |
skier
|
Posted: Sun Nov 14, 2004 1:06 pm Post subject: 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?
code: |
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
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
Posted: Sun Nov 14, 2004 1:19 pm Post subject: (No subject) |
|
|
Simply Window.Hide() the window.
Oh, and 'b' is not a#, b is cb. |
|
|
|
|
|
skier
|
Posted: Sun Nov 14, 2004 1:33 pm Post subject: (No subject) |
|
|
how do i no what the "window id" is |
|
|
|
|
|
Delos
|
Posted: Sun Nov 14, 2004 5:47 pm Post subject: (No subject) |
|
|
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
|
Posted: Mon Nov 15, 2004 3:06 pm Post subject: (No subject) |
|
|
then why does this not work.i dont here anything
code: |
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
|
Posted: Mon Nov 15, 2004 3:20 pm Post subject: (No subject) |
|
|
Try using just Mouse.Where(), it should work a bit better.
BTW, you might want to consider changing that "down" to "downup". |
|
|
|
|
|
skier
|
Posted: Mon Nov 15, 2004 4:10 pm Post subject: (No subject) |
|
|
The mouse.where command works much better thank you for your time |
|
|
|
|
|
|
|