I need to design a macro that does 2 things but don’t know where to start.
I receive notes from a client that are written in a google doc. Each note begins with timecode and is followed by the actual note. For example:
01:02:30:01 - This is example note text.
The timecode format is hours:minutes:seconds:frames. Aka - HH:MM:SS:FF
The macro needs to be able to parse the timecode from the note and create 2 corresponding variables, one var for the timecode, a second var for the note itself. So the example would result in a parse like this:
Timecode - 01:02:30:01
Note - This is example note text
The other thing that needs to happen is to make sure the timecode is formatted correctly.
For my purposes, the timecode must be in the format in my example: HH:MM:SS:FF But oftentimes the timecode will be written like this:
02:30, I.e., MM:SS
2:30 ie, M:SS
O2:30;01 ie, MM:SS:FF (note use if senicolon before FF)
If not otherwise specified, the first two digits can always be assumed to be 01, and the last two can always be 00.
So the logic would be something like:
If the timecode format is xx:xx:xx:xx, use as is
If timecode includes semi colon. Replace with colon
If format is xx:xx, prepend with 01:, and append with :00
If format is x:xx, prepend with 00:0 and append with :00.
can this be done natively with KM? What’s the best way to go about this?
Mr in advance