Using Condition for Affixes

Discussion, questions and support.
Post Reply
perfectrecall
Posts: 18
Joined: Mar 20th, ’23, 08:48

Post by perfectrecall » Apr 20th, ’23, 07:18

I want to use Condition section for affixes. For example, if the word ends with "y", then let the plural version of it take "ies" suffix.
In short, when I write "university", FastKeys will return "universities". Here is my work, is it possible to do that or where is the mistake?

Code: Select all

%INPUT_name%%IF_addings%ies%END%
%INPUT_name% is just a basic manual text input.
Condition section in %IF_addings% is: SubStr(INPUT_name, -1)=y
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Apr 21st, ’23, 14:30

Use "Insert Command Code" macro instead and enter:

Code: Select all

 if (SubStr(INPUT_Name, -0)="y")
	Send, % SubStr(INPUT_Name, 1, -1) "ies"
else
	Send, % INPUT_Name
Use "No output" in the Input macro.
perfectrecall
Posts: 18
Joined: Mar 20th, ’23, 08:48

Post by perfectrecall » Apr 21st, ’23, 22:15

Thank you so much.
I'm getting more admired every day.
Post Reply