[Tutor] A range of numbers

Gregor Lingl glingl at aon.at
Mon Dec 1 19:02:06 EST 2003


VERY STRANGE!!!

My reply is missing here??? It's not missing in the
copy of this mail in my sent-folder.

I wrote:

Another way to do it would be:

x,y = mouse_position()
if 100 <= x <= 200 and 100 <= y <= 200 and ... :
do something

Gregor





Gregor Lingl schrieb:

>Leung Cris schrieb:
>
>  
>
>>I was wondering if it is possible to set a variable or something to a
>>RANGE of numbers. For instance , I want to have it so that when I
>>mouse clicks in a certain region( let say, from (100,100) to
>>(200,200)), it prints out "You Clicked!" . I'm doing this with
>>Livewires right now. Of course, it would take forever if i try to write:
>>
>>if mouse_position() == (100,100) or (100,101) or (100,102)
>>..............................
>>and mouse_buttons()['left'] == 1:
>>do something
>>
>>that won't work... so , can anyone help?
>>
>>_________________________________________________________________
>>MSN ¬Ûï´£¨Ñ±z³Ì²³æªº¤è¦¡¤À¨É¨Ã¦C¦L±zªº¬Û¤ù¡A½Ð²¾¦Ü :
>>http://photos.msn.com.hk/support/worldwide.aspx
>>
>>_______________________________________________
>>Tutor maillist - Tutor at python.org
>>http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>    
>>
>
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
>  
>




More information about the Tutor mailing list