May-13-2022, 07:11 PM
exec('''def test(event, x, y, flags, data): if event == 1: print('LEFT MOUSE BTN DOWN!!!') if event == 2: print('RIGHT MOUSE BTN DOWN!!!') if event == 3: print('MIDDLE MOUSE BTN DOWN!!!')''') functions = {"test":test} functions["test"](3, 0, 0, 0, 0)
Output:MIDDLE MOUSE BTN DOWN!!!