Move cursor in form field text to space character

Share your macros, knowledge, solutions, services, ...
Post Reply
Posts: 106
Joined: Tue Oct 18, 2016 1:12 pm

Move cursor in form field text to space character

Post by Petr » Sun Jan 08, 2017 4:13 pm

A user came up with this question:
I want an automation or keyboard/mouse macro program that is able
to go to a field on a input box in my tax program
go the end of the field
have the cursor move left until it gets to a space
move right and then copy the 3 characters
paste those characters into the input area of the input box
add 3 numbers and 4 symbols

I know your program can do all what I ask but I am unsure of it having the logic to move left until it encounters a space and then move the cursor right?
The macro below does it. It navigates cursor to the position of the last space in the text in the field and then copies to clipboard next three characters. Just type in Notepad (or any other text editor or text field) text like this:
You will see in the clipboard numbers 123!
Make sure the cursor is anywhere on this line (any position, begin, middle, end) and run the macro. You should get "123" text in clipboard.

Code: Select all

<#>Copy whole line to clipboard
<clp_copyselected>(0,10)<#>Find the first space from the end of the line
<for_end><#>If space was found then go to this position
<for_end><#>Now copy the next three characters to clipboard
The macro was created and tested in version 8.2.5.

Post Reply