Use TextSniper with a Click and Drag Action

Tried creating a macro to drag and drop while holding the initial click, but it doesn't seem to generate a lasso in between the two clicks.

I'd like to use it with TextSniper.

Am I doing something wrong?

Screenshot 2022-04-03 at 15.49.18

You mention a lasso, so it seems like you're trying to create a click and drag selection. Presumably, TextSniper displays a lasso when you do this manually. If so, I don't think you're doing anything wrong.

I've seen issues with this in the past based on how the app you're clicking and dragging in behaves.

One thing to try is to separate it into three Move or Click Mouse actions like so:

Click and hold
Move mouse

Thanks for this. Makes sense. I'll see if can devise a workaround with the info you've kindly provided.

Hey just wandering if you ever got this working. I have been trying to figure this out for the past hour or so and can't get KM to work with it, and no matter what I do textsniper just throwing up the cancel message when I run the macro.

I am afraid not. I haven't had the time to look into the workaround

Workaround ~

Assign a keyboard shortcut for the TextSniper action you want to trigger.

Buy and install PopClip from the Mac App Store.

There is a very easy way to make a PopClip extension.
Using this form:

name: TS
key combo: option A

You simply select this text and the PopcClip menu offers the option to install this as an extension as it recognized this text as a PopClip extension.

Here the TS on the PopClip menu triggers an 'Option A' keyboard activation which for me triggers TextSniper's Capture Text action. Obviously, this opens the door to having any Keyboard Maestro macro trigger show up within PopClip's menu.

There is more UI tweaking you can do like adding an icon and color to your PopClip extension. Here's a link: Introducing Extension Snippets - How-Tos & Guides - PopClip Forum

Also, here are Terminal commands to extend the number of extensions PopClip holds and the number in the first row before needing to click the arrow for the second row.

defaults write com.pilotmoon.popclip MaxNumberOfExtensions -int 100
(default 30)

defaults write com.pilotmoon.popclip MenuSizeLimit -int 100
(default 16 - this is the size of the first menu before the “more” button)

Then Quit and restart PopClip.

MaxNumberOfExtensions is the maximum number of extensions allowed to be installed.

MenuSizeLimit is the number of actions shown on the first ‘row’ of PopClip’s pop-up.
The terminal command

There's even a PopClip extension that runs Terminal commands like the ones above by clicking that option in the PopClip once the command is selected. It's a good use of a click-and-drag action.

I can't be sure this will help you, but I have a different approach.

I presume you want to activate textsniper, select something on screen, and then do something with the text it returns.

My solution goes like this:

  1. Define a clipboard to hold out from text sniper and make sure it's empty (would probably be better as a local variable, but clipboard is how I wrote it)
  2. Activate textsniper
  3. Have an until conditions met loop wait for text to appear in the clipboard
  4. Continue macro to process clipboard text

Screen Shot 2023-01-28 at 9.39.50 AM

1 Like