NoteWorthy Composer Forum

Forums => Tips & Tricks => User Tools => Topic started by: Rick G. on 2013-11-25 09:12 pm

Title: rg_replaceSong.php - User Tool to replace current Song
Post by: Rick G. on 2013-11-25 09:12 pm
The attached User Tool will replace the current song with the contents of a file or the Clipboard.
Required 'User Tool Description'->Options are:
When invoked, the tool will prompt for a Song File. If a file is selected, the tool will load the contents of the file, converting a binary file to nwctxt if needed. If no file is selected, the tool will load the text contents of the Clipboard. In either case, the result is checked for a valid NWC Clip or File header.

If a valid header is found, the contents is returned to NWC as the tool's STDOUT.

Nothing earthshaking here, but this may become the foundation of a tool that can merge selected contents with the current song.
As usual, comments and suggestions are welcome.