I have been racking my brain for hours on how to perform the following:
Copy text from a source
Use KM to search and replace specific accented characters if they are found in the system clipboard from a predefined array or dictionary of 16 characters to be replaced
Past original text with replaced characters into another app
I have searched the forums and downloaded some macros that give examples of using an array, JSON dictionary, and word pairs, but all to no avail. I can achieve what I want to do with just a single search and replace for a single character, but I thought it would be more efficient to have KM search and replace them all at once, rather than having to create variable for every single character and passing the text text along each time.
Not sure if I'm even making sense, but any help will sure be appreciated.
"Use KM to search and replace specific accented characters if they are found in the system clipboard from a predefined array or dictionary of 16 characters to be replaced"
What are those specific 16 characters or array you refer to ? Can you list them ?
Here are the characters that I'm looking to replace:
Ά with Ά
Έ with Έ
Ή with Ή
Ί with Ί
Ό with Ό
Ύ with Ύ
Ώ with Ώ
ΐ with ΐ
ά with ά
έ with έ
ή with ή
ί with ί
ΰ with ΰ
ό with ό
ύ with ύ
ώ with ώ
The characters may appear the same depending on the font, but the accent marks are actually different. I did build the following macro (which seems quite inefficient) and I also lose italics and bold formatting as I pass the text to the next variables:
@ccstone I definitely learned that I need to ask for help sooner! Thanks for taking the time to share your solution! It will certainly help me understand how to use arrays.
Forgive me if I'm being bothersome, but I cannot get this macro to perform correctly. I replaced each of the arrays with the characters I was searching for, but none of them are replaced, and I also lose the text formatting.
The only thing that I've noticed different (apart from the search and replace characters) is the "Execute these actions" number is 1 rather than 16 in your screenshot, but I cannot seem to resolve that. And I'm also unsure why the formatting is not being retained. Could I trouble you for any ideas?