473,241 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

get mouse

I'm just trying to test and see if the get mouse statements are working
in my program. If they are, in the console window, it should go back to
the prompt. It doesn't for all of them, just the last
rectangle...sometimes. Am I setting them up correctly? here's the
relevant code...thx

The first two numbers are x1,x2 and the last two are y1, y2.

rectMathButton = CreateRect(4,6,7,8,"grey")
rectMathButton.draw(win)
rectScienceButton = CreateRect(3.5,6.5,5,6,"grey")
rectScienceButton.draw(win)
rectHistoryButton = CreateRect(3.5,6.5,3,4,"grey")
rectHistoryButton.draw(win)
rectGeographyButton = CreateRect(3.1,7,1,2,"grey")
rectGeographyButton.draw(win)

#math
p1 = win.getMouse()
while p1.getX()6 or p1.getX()< 4 or p1.getY()8 or p1.getY()< 7:
p1 = win.getMouse()

#science
p2 = win.getMouse()
while p2.getX()6.5 or p2.getX()< 3.5 or p2.getY()6 or p2.getY()<
5:
p2 = win.getMouse()

#history
p3 = win.getMouse()
while p3.getX()6.5 or p3.getX()< 3.5 or p3.getY()4 or p3.getY()<
3:
p3 = win.getMouse()

#geography
p4 = win.getMouse()
while p4.getX()7 or p4.getX()< 3.1 or p4.getY()2 or p4.getY()<
1.1:
p4 = win.getMouse()

Nov 27 '07 #1
0 1757

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Champaign | last post by:
Hi all, I'm working on an educational applet for a child with special needs. He's got a bit of a trick to make my life more difficult... To interact with the applet he needs to click on...
3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
9
by: punkin | last post by:
I am trying to catch mouse position on the entire screen by dynamically generating mouse click event at every 100 ms. My code only works for IEs but not any Netscape or Gecko-based browsers. The...
5
by: gsb | last post by:
I track the mouse location like this code: function mousePos(e) { var p = new Object(); if(e) { p.x = e.pageX; p.y = e.pageY; } else { p.x = event.x; p.y = event.y; } ... (show) }...
3
by: red | last post by:
mouse events when the mouse is on a "child control" hi everyone; my problem: I have a userControl in this usercontrol, I have a child control (a button) when the mouse moves over the...
3
by: mitsura | last post by:
Hi, I have included a small listing. The test program opens a panel and show a bitmap. What I want is to when the mouse is over the bitmap panel, I want to trap the left mouse click. The...
1
by: Salad | last post by:
I bought a MS Standard Wireless Optical Mouse, ver 3.0 today and I have a question about it. The question is...do you leave the batteries in until they die? Does the red light stay on until the...
3
by: Emjay | last post by:
Newbie needs to know how to set the mouse position.
2
by: markszlazak | last post by:
In the following script, a control displays (black box) in each table cell once you mouse over the cell. Mouse down on the control to change the mode of the table. Drag the mouse over cells in the...
4
by: mike | last post by:
I have the opportunity to rescue a project that uses a mouse to sense the relative position of a machine. The hardware is built...just needs to be programmed. Stop snickering!!! I didn't do it...I...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.