Is there a way to calculate by roman numerals?

I need to add roman numerals, in order, to a large amount of items. I'm wondering if there's a way to easily do this with keyboard maestro. I could use the calculate feature to change the digit one by one, but then it would need to be converted to a roman numeral each time. Is it possible to either calculate by roman numeral or convert to roman numeral?

The "items" are lines of text ?

What do the roman numerals express ?

Line numbers ?

Something else ?

I can't tell if you're just trying to add sequential roman numerals or if you need to do actual calculations.

Either way, there should be lots of ways to do this. For example, I Googled "roman numeral converter javascript" and found this: JavaScript Roman Numeral Converter

You could use it to translate arabic to roman numerals and back as needed.

1 Like

They are files that need to be renamed by roman numeral. It is not only one set; I will need to do this off and on consistently. The amount can be anywhere from 10 to 500 files each time.

Thank you! I looked at it and can somewhat understand it, but I'm not an expert in javascript and don't think I've used it with keyboard maestro before, so I haven't tried to incorporate this yet but will look into it when I have enough time to try and learn as I go.

I did however decide to, for now, just go ahead and manually do it all. I wrote out all the roman numerals line by line and then I wrote a macro that sets a variable to this. Then, I looped the rest of the macro after that so that each time it takes the first result in the variable, uses it, and then erases the first result of the variable and starts over, so that the next time it will be the next result being used. This works quite well but I did have to do the manual labour of preparing the roman numerals list.

Try these samples.

romanize Macro (v10.2)

romanize.kmmacros (4.0 KB)

Keyboard Maestro Export

1 Like