Skip to main content
Topic: rg_lyricCopy.vbs - User Tool for Moving Lyrics (Read 7975 times) previous topic - next topic

rg_lyricCopy.vbs - User Tool for Moving Lyrics

When used on a staff with lyrics, the lyrics will be copied to the Clipboard.
When used on a staff without lyrics, the lyrics in the Clipboard will be added to the staff.

Download to your scripts folder. Use the attached graphic as a guide to naming and setup.
Registered user since 1996

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #1
Thanks Rick,
this is another one that will be quite useful to me.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #2
Indeed, Thanks Rick - not particularly necessary for single verse copies, they are just about manageable without too much trouble, but invaluable for multi verses.
Rich.

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #3
You are both welcome. I'm finding it useful for copying the lyrics to an editor, tweaking a bit, and copying it back. Transferring lyrics from one song to another is also useful. Some users won't like that it doesn't adjust the staff boundaries, but I see that as a feature.

BTW, this is in VBScript because I haven't figured out how to read and write text to the clipboard with PHP. Reading throws up security prompts asking if I want to allow the script to access the clipboard.
Registered user since 1996

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #4
I'm finding it useful for copying the lyrics to an editor, tweaking a bit, and copying it back.

Hmmm,  I'm interested in what you are doing here .  When you copy back after tweaking, before running your script, are you first of all setting the lyric line count to <none> so that the script knows that it has to copy back ? If so, I would also find the staff boundaries to be an issue since they are reset.

Maybe you are pasting back without using your script, in which case instruction marks such as "\'s" and "\r\n" do not past back as required and nwctxt items such as "|Lyric4|Text:" are not understood.

Can you just run me through how you are doing this in case I've missed something. Ta.

<edit>Or it occurs that you might be just tweaking your script as appropriate for what you want to do</edit>
Rich.

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #5
Hmmm,  I'm interested in what you are doing here .
Usually, I'm dropping a verse or changing the order. Manually restoring the staff boundary isn't a problem for me.

<edit>Or it occurs that you might be just tweaking your script as appropriate for what you want to do</edit>
No, I do that with some unpublished tools, but not this one. If I like the boundaries on the source staff, I just make a mental note of them and put them back in after I change the lyric count to <none>. This is not a tool I use repeatedly on the same song. For a song with many verses, one use can save quite a bit of time.

Maybe you are pasting back without using your script, in which case instruction marks such as "\'s" and "\r\n" do not past back as required and nwctxt items such as "|Lyric4|Text:" are not understood.
No, I'm using the tool. Pasting back into a Lyric textarea would often be more trouble than it is worth.

I do a bit of work with hymns. Quite a few words are capitalized, such as references to the diety. I forget to capitalize them. The tool allows me to search and replace all of them at once instead of moving from verse to verse.
Registered user since 1996

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #6
Hi Rick,
ran into a problem...  I had a score I was working on and put the lyrics on the wrong staff.  I also had text chords on what would be the source staff as well as some SwingDings characters on another staff.

First time through the tool was fine, but the second run to paste into the correct staff resulted in some of the characters from SwingDings and SwingChord to be changed.  The character affected were all above chr$(127).  This occurred in staves not involved in the "paste" operation.  Characters below chr$(127) seemed to be unaffected.

Can't give you an example from my file because while I was dilligently saving it, it seems my network was having some problems and the file was disappearing into the ether(net).  Anyhow, I'd finished to a point where I thought I could test to make sure I had the details right (which I did), but when I went to revert to my saved version NWC couldn't and I foolishly exited the one I was working on without saving it elsewhere (yeah, I know, stupid...)
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #7
paste into the correct staff resulted in some of the characters from SwingDings and SwingChord to be changed.  The character affected were all above chr$(127).
Thanks, especially for adding:
This occurred in staves not involved in the "paste" operation.
Same thing happened to me with Braces using Windows Symbol font {}. I'll check it out. I hope that it is not a problem with echoing from stdin to stdout :(
Registered user since 1996

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #8
I hope that it is not a problem with echoing from stdin to stdout :(
It was, but not as big a problem as I feared. I was using WScript.Echo to write back the modified song. WScript.Echo mangles some characters with the high bit set. WScript.StdOut.WriteLine works better. I have replaced version 1.00 with version 1.10 at the top of the page.
Registered user since 1996

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #9
Finally got my file rebuilt - tested new version - problem gone - thanks Rick
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

 

Re: rg_lyricCopy.vbs - User Tool for Moving Lyrics

Reply #10
Thanks for confirmation. I now find that if 'Prompts for User Input' is checked,  the script runs much faster. The script doesn't prompt for input, but evidently NWC does something that affects speed when the script tries to run the HTA that 'Class clsClipText' uses to paste (setData).  Go figure ...
Registered user since 1996