I'm trying to write a macro that does this:
- Copy a URL in Safari to a variable;
- Copy an article's title to a 2nd variable;
- Concatenate the 2 variables;
- Go to a specific page (to new Post.news site);
- Click button in lower-left corner;
- Click in the page (a text box);
- 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.