Keyboard Maestro Postbox to Fantastical 2
Thanks to @vincent_ardern and @ccstone for pointing out my lack of information and surfacing links on how to correctly format a post. I was not aware of these links; they are extremely helpful. I appreciate your time and patients with a new member of the community. So, lets try this again.
KM Version: 8.2.4
macOS version: 10.13.6
End goal: I would like to copy an email message link from the Postbox mail client and then create an event in Fantastical 2 that includes that email message link.
Process:
- The macro places the cursor on the screen (by finding an image) and then right clicks and selects "copy message link."
- Set a variable (messageLink) to the clipboard text.
- Prompt user for text of the calendar event and place the user input in variable (eventSyntax).
- Activate Fantastical
- Open create new calendar event input window (via simulated keyboard shortcut).
- Set system clipboard to the calendar event syntax (via the variable eventSyntax)
- Paste the clipboard to the Fantastical new event input window
- The macro places the cursor on the screen (by finding an image) and uses simulated keyboard presses to locate the URL field.
- Set system clipboard to the message url (using the messageLink variable)
- Paste the message link into the Fantastical 2 event input window URL field
- Use keyboard simulation to finalize the calendar event
Failure point: The Macro runs without error. However, it either fails to past the message URL in the URL field in Fantastical 2 or places old clipboard text. The expected result is that the the correct message link (copied) earlier is pasted in the URL field in Fantastical 2.
Encoded URL Looks like this when directly copy and pasted: x-postbox-message://SANEBOX.ATTACH.DM5PR0101MB30843A6435C51DDB1EC4D26789260%40DM5PR0101MB3084.prod.exchangelabs.com
I am grateful to any suggestions on how to make this work—including different (and better) ways to automate this process.
Postbox Mail client to Fantastical 2
Prompt for User Input.kmactions (837 B)