python autopy problems/confusion
Question: so im trying to make a bot script that when a certain hex color is on a
certain pixel it will execute some code to move the mouse,click etc. and i
have it to where it takes a screenshot every 1 second to the same png file and
updates the png file's pic. i have the hex color for the pixel cords print to
the console so i can see if its updating or not. it never updates it just
stays the same. ive tried writing this script many ways and sadly i only have
one version to show you but hopefully you will understand what i was trying to
accomplish. im on python 2.7 btw. thank you all for your time!!!!

    
    
    import autopy
    from time import sleep
    
    color_grabber =    hex(autopy.bitmap.Bitmap.open("screen1.png").get_color(292,115))
    
    
    def color_checker():
        global color_grabber
        color_grabber = color_grabber
        return
    
    def mouse_move_click():
        autopy.mouse.smooth_move(433,320)
        autopy.mouse.click()
    
    def screen_grab():
        autopy.bitmap.capture_screen().save("screen1.png")  
    
    def the_ifs(mouse_move_click):
        if color_checker == "0xffcb05":
            mouse_move_click()
    
    while 1==1:
        sleep(1)
        screen_grab()
        color_checker()
        the_ifs(mouse_move_click)
        print color_grabber
    


Answer: 
    from autopy.mouse import LEFT_BUTTON
    autopy.mouse.click(LEFT_BUTTON)
    autopy.mouse.toggle(True, LEFT_BUTTON)
    autopy.mouse.toggle(False, LEFT_BUTTON)
    

I see the need to do this in other people's code, but I don't understand why
want to use the up and down after the click.In fact when I test on Windows 7,
click is effective, but is not very correct, feel more like the down to my
operation

