Put cursor focus at end of string in $Name

This is a firstworld request, but I was wondering if there was a way to have Tinderbox put the cursor focus at the end of the $Name string when a new now is created by action code. Right now, when a new note is created TBX highlights the entire word “untiled” when a new notes is created so that you can easily create a new note name. In my case, I’m using action code to immediately add a prefix to a $Name and so would like the cursor to be inserted immediately following the prefix, rather than highlighting the name so that I can start typing. Does anyone have an idea how I could make this happen?

My Action Code

image

Where I want the cursor focus

image

One suggestion is to merely hit the right or down arrow key. That should take you to the end of the text entry, assuming that the text field is selected. Similarly, the left or up arrow key should take you to the beginning. If no text is currently selected in the insertion box, then down arrow will take you to the end (where you want to go) while the up arrow will take you to the beginning.

I realize that’s not completely what you’re looking for, but the arrow key actions are one of the nice features in macOS that have been there pretty much since the beginning. These arrow key actions work in essentially all such text entry boxes throughout most macOS applications. Windows doesn’t support this arrow key behavior in general.

While I’m on the subject of useful command key shortcuts, another one that often gets overlooked is the behavior of command-Z, or undo. If you don’t like having to always turn SmartQuotes on and off, you can use command-Z to immediately undo the SmartQuote substitution. For example, if you enter a straight quote character with SmartQuotes turned on, it will immediately be replaced with the curly quote equivalent. However, if the next thing you do is enter command-Z, this SmartQuote action will be undone. This works just about everywhere in macOS where there are automatic replacements of something you just typed, including unhelpful spelling corrections.

Edit: Corrected to say “command-Z” instead of “control-Z” (my brain glitch).

1 Like

Perfect! That does it!

Another very useful shortcut:

Control-T : Swap the character behind the insertion point with the character in front of the insertion point.
Mac keyboard shortcuts - Apple Support

3 Likes