Trying to Perfect a Macro in a Browser

I'm trying to write a macro that does this:

  1. Copy a URL in Safari to a variable;
  2. Copy an article's title to a 2nd variable;
  3. Concatenate the 2 variables;
  4. Go to a specific page (to new Post.news site);
  5. Click button in lower-left corner;
  6. Click in the page (a text box);
  7. Paste the concatenated variable

I've got all but steps 6 & 7 working; step 5 clicks a POST button, and that works fine. I know that I'm clicking in the right location because I wrote a macro that uses an alert to show me %CurrentMouse%.

I should see the cursor blinking in the text box, but that never happens; I even tried adding some pauses in there, but that didn't help.

Any ideas? Here's the macro:

Post this article
Triggered by any of the following:
The Hot Key ⌃⌥⌘P is pressed
Will execute the following actions:
Activate Safari
Notify on failure.

[ COPIES THE TEXT SELECTION - THE ARTICLE'S TITLE ]
Set Variable “title” to Text
%SystemClipboard%

[ COPIES THE URL ]
Select Menu Item in Safari
Select: File ⇢ Open Location…
Stop macro and notify on failure.
Copy

[ CONCATENATES TITLE & URL INTO THE VARIABLE "tweet" ]
Set Variable “tweet” to Text
%title%%Return%%Return%%SystemClipboard%

[ GOES TO THE POST SITE, OPENS THE COMPOSE SCREEN ]
Open URL “https://post.news/composer”
With Safari
Notify on failure.

[ CLICKS THE POST BUTTON ]
Move and Click
At (55,80) from the bottom right corner of the front window.
Stop macro and notify on failure.

Pause for 1 Second
Notify on failure.

[ NOT SURE I EVEN NEED THIS ]
Activate Safari
Notify on failure.

[ MOVE TO TEXT BOX - here's where it seems to fail ]
Move and Click
At (371,340) from the top left corner of the front window.
Stop macro and notify on failure.

1 Like

Hey Bob,

Please post an actual test macro that as simply as possible demonstrates your problem.

If we're not testing – we're guessing...


When posting macros to the Keyboard Maestro forum please use these guidelines:

  1. Always Post a Macro File.

    • This means people won't have to reinvent the wheel to test your macro, and that significantly improves the likelihood that someone will help you.
  2. Always Post a Macro Image.

    • Folks generally won't download something they haven't eyeballed first, so an image of the macro is crucial.

If you haven't seen these they're worth a moment of your time:


Take Care,
Chris

(Keyboard Maestro Moderator)

1 Like

I solved it by putting a CLICK step in. I just posted the finished macro.

Create a new post in Post.news forum - macro

Post This Article.kmmacros (7.6 KB)
Keyboard Maestro Export