I'm doing a program for Mac and need to find a way to "click" a button from a code.
I'm trying to put this code in another button and I've tried this in the following 3 ways:
func mouseDown(_ NSButton1: NSEvent) { }
func performClick(_ NSButton1: NSEvent) { }
Button1.sendActionsForControlEvents(NSControlEvents.TouchUpInside)
Does anyone know how to do this?