Use variable in "move mouse" field

Hi all, any way to use a variable not to SET the mouse location, but to MOVE it?

Like this:

Thanks

Use the variables without the “%Variable%%” stuff. Just A and B in you example.

See also here (WiKi).

@Tom Perfect! Thank you!

Side note: what’s the logic here? Why not use the standard %Variable% notation?

Here's my explanation. You'd have to ask @peternlewis to get his design logic.

  • In a text field, the "%Variable%" notation is required to distinguish KM Variables from plain text.

  • In a calculation field, plain text is not allowed, so any text entered is considered to be a KM Variable. Once you understand this, it makes entry of Variable names much simpler and easier.

1 Like

@JMichaelTX Very helpful, thank you.

@peternlewis FWIW, might be a little more user-friendly to make calculation fields accept variables in %Variable% notation as well.

1 Like

Interesting that you should have this issue at the same time as this post:

Same issue, really.

1 Like

Hey Jack,

Eek! I don't agree at all...  :wink:

However – I would like to see an absolutely no-brainer method of determining whether a field is a calculation field or a text field – something a basic user would be comfortable with.

-Chris

2 Likes

The two types of text fields (text and numeric) take completely different formats of inputs. One takes tokens and backslash characters, and the other takes variables, numbers, functions and operators.

Allowing you to use the %Variable% token format for variables in numeric fields would make no sense at all, it would simply defer you having to understand the difference between the two fields.

Type % then F5.

F5 is the system completion command. If it is a text field, % then F5 will display a list of possible text tokens. If it is a numeric field, then nothing will appear. Alternatively, type something like "CALC" F5 and Keyboard Maestro will fill in the CALCULATE() function in a numeric field, but not in a text field.

3 Likes

@ccstone @peternlewis Hi guys, I hear you—not a good idea to have it accept both notations. Duly noted! :slight_smile:

But FWIW, I’m an experienced KM user, and I didn’t understand the “two types of fields” business, even after I looked around in the documentation. So discovery here is low. It might be possible using %F5 to find out whether or not a field is a calculation field. But how will other users discover that trick? Just my 2 cents.

If I could come up with a good, subtle way to annotate the fields, I would.

As a general rule numeric fields almost always start small with arrow controls next to them and then expand, which is fairly noticeable, but still not something most people will understand, so I really don’t know what more I can do.

1 Like

What about gray italic preview text that says “Calculation” while the field is empty and inactive?

1 Like

How about a glyph of some sort, at the end of the edit control field? Something like . That would make it pretty obvious.

And if you clicked on it, it could provide help, or something else - even an expression builder (pretty-much kidding on that last part).

1 Like

Hey Peter,

Is it possible to add a label in the contextual menu?

That would be pretty unobtrusive.

-Chris

1 Like

Hello friends, I have a question about how to move the mouse location based in a Clipboard content. In my browser if I run the macro it should find the word or number and move the mouse.

It's useful for me cause I need to copy some numbers from a Excel and find+click this number in my browser...

Thanks for your attention!

It would be better to start a new topic and ask your question there.

What is the in the Clipboard?

move the mouse how?

Start a new topic and fully explain what you are trying to do - explain what you want to do not simply how you want to do it, and include as much detail as possible.