MouseClick on Window?
-
- User
- Posts: 24
- Joined: Sat Jul 24, 2010 11:56 am
MouseClick on Window?
Okay, so i figured out how i can find my Mouse position on a Window by just checking its coordinates whenever an unknown (-1) event happens, but i can't find out how to get an mouse button click on the Window. How do i do that on OS X?
-
- Enthusiast
- Posts: 796
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
Re: MouseClick on Window?
Hi OrangeJuice,OrangeJuice wrote:Okay, so i figured out how i can find my Mouse position on a Window by just checking its coordinates whenever an unknown (-1) event happens, but i can't find out how to get an mouse button click on the Window. How do i do that on OS X?
try this:
Code: Select all
repeat
WindowEvent = WaitWindowEvent()
TheType = EventType()
if WindowEvent = #PB_Event_Gadget
If TheType = #PB_EventType_LeftClick
MX = WindowMouseX(0)
MY = WindowMouseY(0)
endif
endif
forever
Good luck!
Regards,
JamiroKwai
JamiroKwai
-
- User
- Posts: 24
- Joined: Sat Jul 24, 2010 11:56 am
Re: MouseClick on Window?
That does only works with an Gadget as i understand it, and i can't use one since i have screen on a window in which I'm trying to do things with the mouse. I can't use the screen mouse functions either, since they don't play nice with the gadgets on the screen around it.
I can't even try it right now, since PureBasic doesn't seem to have survived the last crash I caused trying to find an solution for the Mouse pain, I get an "compiler isn't loaded yet" and restart won't help.
Why oh why can't PureBasic just throw more helpful events then -1 on non Windows machines.
I can't even try it right now, since PureBasic doesn't seem to have survived the last crash I caused trying to find an solution for the Mouse pain, I get an "compiler isn't loaded yet" and restart won't help.
Why oh why can't PureBasic just throw more helpful events then -1 on non Windows machines.