#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0

    Mouseclick event


    i want to take the user to input the number of clicks he wants to make on an image. say 5 clicks. i want to figure out the x,y coordinates of the point of click and the corresponding pixel value .i want to store the pixel values in an array.i tried using for loop. but it doesnt seem to work. since am new to python, i am not very sure how to go ahead. any help is welcome!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    194
    Rep Power
    2
    What library are you using? If you are using pygame I could assist you. If you are using something else I'm sure others could assist you.

    -Mek
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0
    Originally Posted by Mekire
    What library are you using? If you are using pygame I could assist you. If you are using something else I'm sure others could assist you.

    -Mek
    I used tkinter,pil. I created a canvas,added the image and used canvas.bind<BUTTON 1> to detect the click.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2009
    Posts
    479
    Rep Power
    33

IMN logo majestic logo threadwatch logo seochat tools logo