This is a little Macro to convert todays day into Roman Numerals, Sample...
**
Convert year into Roman Numerals script:
**
tell application "Keyboard Maestro Engine"
set kmVarRef to make variable with properties {name:"Year_km"}
set n to value of kmVarRef
--¸set value of kmVarRef to 10
end tell
try
--set n to 2015
if (n as integer) > 3999 then error "Max number is 3999" number 1
set r to ""
repeat with i from 1 to (count (n as string))
set r to item (((item -i of (n as string)) as integer) + 1) of item i of ¬
{{"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}, ¬
{"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"}, ¬
{"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"}, ¬
{"", "M", "MM", "MMM"}} & r
end repeat
return r
on error eMsg number eNum
error display dialog "Year out of range Try Again" with icon caution
end try
**
Convert month into Roman Numerals script:
**
tell application "Keyboard Maestro Engine"
set kmVarRef to make variable with properties {name:"Month_km"}
set n to value of kmVarRef
end tell
set MonthList to {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XII", "XII"}
set TheMonth to item n of MonthList
return TheMonth
**
Convert day into Roman Numerals script:
**
tell application "Keyboard Maestro Engine"
set kmVarRef to make variable with properties {name:"Day_km"}
set n to value of kmVarRef
end tell
set DayList to {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI", "XXII", "XXXII", "XXIV", "XXV", "XXVI", "XXVII", "XXVIII", "XXIX", "XXX", "XXXI"}
set TheDay to item n of DayList
return TheDay
Here is the source macro..
Get Roman Sample. By William Mabey.kmmacros (5.8 KB)
Enjoy...
BTW.. I'm a newbie so I'm asking to be easy on me.. LOL..
Also I see after posting I noticed unnecessary remarks in the script... can be removed.. Sorry..
I'm tiered.. LOL..
William (Bill)