I put together a macro that does a Save As and other things within a drawing app. Works great.
The actions are
1- Activate- Canvas X Draw (drawing application)
2- Select Menu- Front Application - Menu Title ‘File,’ Menu Item ‘Save As…’
3- Pause- 1 sec (These pauses probably are optional. I left them in.)
4- Press Button- Press button named: 'Where:'
5- Pause- 1
6- Insert Text- Insert text by typing ‘Desktop’ (This is my particular location I want file sent to.)
7- Type the Enter Keystroke- Simulate keystroke ‘Enter’
8- Pause- 1
9- Press Button- ‘Save’
10- Pause- 1.5
11- Press Button- Press button named ‘Replace’
12- Pause 1.5
13- Select in the Menu Front Application- Select menu in Front Application - Menu Title ‘File,’ Menu Item ‘Close
Nice! A working macro is a "correct" macro, and there's no need to take it further if you don't want to.
But take a look at the last few posts in this recent thread to see how you could replace some of those hard-coded pauses with "Pause Until..." Actions that wait for dialogs to be available.
Pausing until the UI is ready both makes your macro more robust (a delay in the dialog arriving won't break your macro) and faster to execute (it doesn't have to wait a full second when the dialog appears quicker than that).
Will definitely look at it and change macro I posted.
I wish I would have had this robust macro tool after I had to switch to OSX. At the time, I used YoupiKey, which became yKey, UI Browser, Automator and of course Applescript.
While utilities like these are useful, never forget the built-in macOS shortcuts. You can replace your steps 4-8 with ⇧⌘D, which will take you to the Desktop in any standard Open or Save dialog (or in a Finder window).
And you can, of course send ⇧⌘D with a KM "Type a Keystroke" Action