Is there some simple way to convert the clip text to a normal text file which can be saved?
Grab your clip in NWC (using Ctrl-C); open Notepad (or any text editor) and press Ctrl-V. Save the file as text.
- John
Works slick!
Many thanks.
Robert
Since you asked in the Tool Forum, here's a tool.
I named this:
To NotePad.vbsUse the command:
wscript "Scripts\To NotePad.vbs"Option Explicit
Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")
Dim f: f = fso.GetBaseName(fso.GetTempName) & ".txt"
f = fso.BuildPath(fso.GetSpecialFolder(2), f) ' 2 = %TEMP%
fso.CreateTextFile(f).Write(WScript.StdIn.Read(46080))
CreateObject("WScript.Shell").Run(f) ' leaves %TEMP%\nwt*.TMP
WScript.Sleep 500: fso.DeleteFile(f)
On Error Resume Next
For Each f In fso.GetSpecialFolder(2).Files
If Left(f.Name, 3) & Right(f.Name, 4) = "nwt.TMP" Then f.Delete
Next
If WScript.StdIn.AtEndOfStream Then WScript.Quit
MsgBox "Truncated to 45K bytes", vbExclamation, "Warning"
G'day Rick,
neat little tool - as usual for your contributions it works just nicely.
A slightly different take for those that want to use a specific editor:
The syntax for
Command: is a bit complex. For WordPad using a file called
1.txt in the current directory, use:
For a different editor using the temporary directory:
Note that you must repeat the filename. Since the script knows nothing about the editor's commandline syntax, it can't know how and where to put the filename. Quotes are needed around the editor filename. Another set (of quotes) is needed around the temp filename if there are space(s) in it. Not every editor will expand environment settings so
%temp% might not work for everyone.
This version also waits until you exit your editor to delete the temp file. In the earlier version, if the disk was hibernating, the script could delete the file before NotePad could load it.
Rick:
I installed your EditClip.vbs and for the Command part of the User Tool Description have the following:
WScript Scripts\Editclip.vbs "C:\tse32\e32.exe" %temp%\1.txt /file:%temp%\1.txt
It brings up the highlighted part of a staff in my editor, but changes I make are not reflected in the score after I save and exit from the editor.
The program doesn't work that way. You have to Select All + Copy from your editor and then Paste into NWC2. Try it. If it is too cumbersome, I'll try to automate it some more. At this point I want to verify that my command line routines will let you automagically run a TSE macro on it.
To work the way you describe, the file would need to get loaded into the clipboard, then the keystrokes to paste it would need to be forced into NWC2. I can do that in about 80 lines of code, but it is dicey.
It might be time for me to do some experimenting now. Unfortunately, I am very busy for a few days, after which I will be out of the country. But "note to self" says that next week I must investigate - and report back. Kick me in the shins if I don't.
Consider yourself kicked :)
yeah - and then I forgot it's time for Amnesty cards, for December performance rehearsals, for family visits and other unspecified but nice surprises. And the "Africa! Africa!" show. So it did not work - yet. Thanks anyway.