Acttion Step for Select All in an OmniFocus perspective


#1

Trying to put together action steps that will allow me to select all line items in a perspective in OmniFocus and then copy as taskpaper tasks.
These are menu items in OmniFocus but I don't see how to write them in Keyboard Maestro.
I am really new at this so any help is appreciated

Thanks David,


#2

Hey David,

See the Select or Show a Menu Item action.

If you're still stuck then report back.

-Chris


#3

Chris,

Thanks for helping me out on this. I was able to use the menu item to copy select all that I needed.

However, I would like to paste it to an application such as Drafts

I do not see with paste action how to direct where you want to copy to.

I already have opened Drafts to receive anything to past to it.

So how to get what you copied from one app to another using Keyboard Maestro?

Last thing where in the process of selecting text can you filter out some things you would like before pasting?

Thanks, David


#4

Hey David,

You have to activate the application you want to paste to (unless that application is scriptable), then you can paste into the focused window.

You can use a Search and Replace action on the clipboard or a variable.

-Chris


#5

Hey Chris. I still have problems pasteing to the drafts app even if it is open.

Can you see what my error is?

Thanks

David


#6

Firstly – don't use an Open a File Folder or Application action to activate an Application – use a Activate a Specific Application action.

Secondly – Keyboard Maestro is faster than you and the macOS, so appropriate pauses are sometimes necessary.

After the Open Drafts action place a Pause Until action.

Something similar to this:

Pause Until.kmactions (1.3 KB)

-Chris


#7

Hi Chris,

Made the first substitution of changing to activate both OmniFocus and Drafts.

Inserted the pauses.

Macro still does not work, so I must be doing something else wrong. Running the copy action
by itself works because there is the info in the clipboard to manually paste it.

However, the paste function in the macro even with pause does not seem to work.

Here is a screenshot.

I also tried TextEdit to see if it was Drafts that was the issue but had the same no paste result.


#8

@calver
My question would be; why does your "Select All" menu item have blank 'submenu' fields?

This is what I get:


#9

Yes it does not make sense to have those blank lines.
I will remove them to see if it makes a difference in running the macro. Thanks


#10

Hey David,

Your last action there is pause until Drafts is running but NOT at the front.

It MUST be FRONTMOST.

You can't paste into apps in the background, unless they are appropriately scriptable.

Just because the macOS or Keyboard Maestro thinks an application is frontmost doesn't necessarily mean it's ready to receive text.

Timing issues can be very tricky.

You can add manual pauses to help test these.

-Chris


#11

Hi Chris,
I checked off box to set Drafts to front but macro still does not work.
I can run the copy action and it is in clipboard because I can manually paste to Drafts or TextEdit, etc but the paste action does not work.

Maybe if Keyboard Marstro had a paste to action things would be much simpler.

Copy and paste from one app to another should not be a difficult task but I don’t seem to get where I am making a mistake in the macro.

Will try working on it latter


#12

Hey David,

Keyboard Maestro does have a Paste action.

What you're doing should be very simple.

I could do it easily between BBEdit and TextEdit, but I don't have Drafts (Mac) to test with.

-Chris


#13

Hi Chris, I know about the paste action but would it make a difference if the paste action had a paste to with an application choice to pick from like the activate action or other actions that specify an app.


#14

Hey David,

That would be nice, but it can't be done.

Paste depends upon the system clipboard, and that is a narrow gateway governed by macOS.

The only way around this (at this time) is AppleScript. An application has to be appropriately scriptable like BBEdit.

-Chris