Skip to main content
Topic: rg_replaceSong.php - User Tool to replace current Song (Read 4643 times) previous topic - next topic

rg_replaceSong.php - User Tool to replace current Song

The attached User Tool will replace the current song with the contents of a file or the Clipboard.
Required 'User Tool Description'->Options are:
  • Returns File Text
  • Prompts for User Input

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.
Registered user since 1996