I'm trying to execute a sequence of keystrokes that repeat themselves until the end of the document (Pages) is reached by the macro. I place the cursor at the starting point and then execute the macro. I've managed to make one series of keystrokes to run correctly. Now the sequence should repeat itself until the end of the document is reached.The end of the document could be determined by the lack of a blank line (new paragraph).
Hi! Sure thing. By the way, this is the step that precedes your Copy as chord macro. However, these are unrelated steps completely (i.e. require a separate macro).
Attached is the sample file and my macro. The macro applies different styles to the text, namely: chord name, chord graph, lyric. The text may end up in a chord graph or in a lyric style after the macro is sequentially executed. The macro should stop at the end of the document.
I wasn't aware of the unicode character set for these musical notations, excellent find, thanks! Will see if this can be integrated in my workflow, but I'd guess it's a simple matter of replacing the characters with the library.
That said, I hope someone with more experience with Gui processes can help. Maybe I need to insert a specific character at the end of the document and tell KM to stop at that.
Hi @Drukinn. I've assuming you started the key sequence you supplied with the cursor positioned on the line above the first chord. If not, I don't understand how you are attempting to change the format. If my assumption is incorrect, please supply a copy of the document with the desired changes applied.
But if my assumption is correct...
One possibility is to check the status of the Copy menu item. The following macro works for the example you supplied, but note the this would have to be modified if the format differs in any way. (Note that I changed the macro trigger; you'll might want to change that back.)
DOWNLOAD Macro File: Style chord sheet (v2).kmmacros (16 KB) Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.
Hi @_jims , I start the sequence at the end of the chord line. Then my macro executes a return and in the next line it styles for chord diagrams (F3). Then it moves to the line below and it styles for lyrics (F2). Then it moves the cursor to the end of the lyrics line. A final model can be seen attached. Your macro does not work for me.
@Drukinn, thanks for supplying the document with the target format.
The following macro should do the trick. Position the cursor at the beginning of the first chord line before triggering the macro.
DOWNLOAD Macro File: Style chord sheet (v3).kmmacros (16 KB) Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.