Hi,

How can I send right nouse click with python?

thanks.

You need to make this a GUI program ...

# bind mouse clicks using the Tkinter GUI toolkit
# (usually included in your Python installation)

import Tkinter as tk

def change_color(event):
    btn1.config(fg='red')

root = tk.Tk()
btn1 = tk.Button(root, text='Click me with the right mouse button ...')
btn1.pack()

btn1.bind('<Button-3>', change_color)  # bind right mouse click

root.mainloop()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.