Hello, I wrote a macro to open the Evernote Web Clipper in safari using AppleScript
it works specifically for the window called Keyboard Maestro Discourse - Discussion forum for Keyboard Maestro, the powerful macro program for macOS. How do I generalize the script to make it work with any window in safari ie frontmost window ?
thanks in advance for your time and help
Note that I can't display the script below in code form because for some reason, it cuts off the window name
activate application "Safari" tell application "System Events" tell process "Safari" click button 1 of UI element 1 of group 4 of tool bar 1 of window "Keyboard Maestro Discourse - Discussion forum for Keyboard Maestro, the powerful macro program for macOS" end tell end tell