Keyboard Maestro and ChatGPT

I tried using KM and ChatGPT together and this is the response. Don't know if it works yet though.

create a macro in keyboard maestro that emails a webpage to myself

Sure, here's how you can create a macro in Keyboard Maestro that emails a webpage to yourself:

  1. Open Keyboard Maestro and create a new macro.
  2. Give your macro a name, such as "Email Webpage".
  3. Click the "Plus" button to add a new action.
  4. Choose "Execute AppleScript" from the "Actions" list.
  5. In the AppleScript editor, paste the following code:

vbnetCopy code

set recipientEmail to "your@email.com" -- replace with your email address
set subjectLine to "Webpage: " & name of front window
tell application "Safari" to set bodyContent to (source of front document)
tell application "Mail"
    set newMessage to make new outgoing message with properties {subject:subjectLine, content:bodyContent, visible:true}
    tell newMessage
        make new to recipient with properties {address:recipientEmail}
        send
    end tell
end tell
  1. Replace "your@email.com" with your actual email address.
  2. Save the macro and assign it a hotkey trigger or add it to the menu bar.

Now, whenever you want to email a webpage to yourself, simply navigate to the desired page and activate the macro. A new email message will open in Mail with the page's HTML source code in the body of the email and your email address in the "To" field. You can then add any additional notes or comments and send the email.

Tried it and it did not work for me.

Maybe humans are still smarter??? :innocent:

Would be nice if it did then try it with making Regex?

Roger

I tried it and the script fails.

To be nitpicking, here are 3 other observations you @akiptif might want to explore/address when you give feedback to ChatGPT

  1. What are you supposed to do with “vbnetCopy code”?
  2. I’d love to see how you “Save the macro” in step 7 since KM doesn’t actually provide an explicit way to do that!
  3. I can’t see anywhere that there’s an opportunity for you to “then add any additional notes or comments and send the email” as the AppleScript has a send command in there already that preempts any user interaction.

I think this is a great example of the false sense of security that ChatGPT gives you by sounding authoritative but without actually being accurate.