Skip to main content
Topic: Printing 500 songs (Read 7598 times) previous topic - next topic

Printing 500 songs

Hi all,
I need to print around 500 songs (*.nwc files)....

Is there any way to automat the process ?
Like...I give the folder name and NWC prints all the *.nwc files in it.

I know I can open an nwc file from command line
("nwc32 \samples\jingle.nwc", in DOS prompt, opens the jingle.nwc)
Is there any way to print na nwc file in this fation....

thanks in advance
-Sam

Re: Printing 500 songs

Reply #1
There is no elegant way to automate the process of printing multiple files within NWC. Your best bet might be to load a group of files, in blocks, and perform a File | Print and Close on each file, in sequence. Once a batch is finished, start a new batch. The size of each batch depends on how much memory you have on your system. The more memory you have, the more song files can be loaded at one time.

Re: Printing 500 songs

Reply #2
If all your files are in the same directory, I can see two ways: a .bat file under dos, or a macro-recorder solution.

for the .Bat file, think of the "start /w " command to add to each file name (obtained in foobar.bat with "dir /w *.nwc > foobar.bat); for the macro, remember that you can memorize the current file name into the clipboard (provided you don't use it for something else).

Sorry, ain't got more time tonite for more details, ask for more if you can't find out.
but first of all, r u sure that all your files are in correct layout state (Landscape||Portrait,...) ?

HTH,
     Dominique

Re: Printing 500 songs

Reply #3
Dear Mr. Dominique,
Thanks for your hint....

The DOS batch file approach seem OK ( I am more comfortable with DOS)
I understand that I can start NWC with a .nwc file using "start /w"
But... how do I ask NWC to print it... and then exit (so that I do not have 500 NWCs open)

Page layout of all the songs are OK...
Even if it is not, it is OK because I am printing it for verification only...

thanks in advance

Re: Printing 500 songs

Reply #4
There is no known way to make NWC print automatically.
But as it is always the same process:
  Enter (in WinFile/Explorer), to open the file;
[then in NWC:]
  Enter(if you have tips activated), to close the tips window;
  Ctrl-P,      to call the print window
  Enter,        to validate
  Alt-F4      to close NWC
[then in WinFile/Explorer]
  Down arrow    to go to next file. then go to step 1: Enter...
and that's why I proposed the "macro" way.

But the batch approach is correct, since the '/w' option of "start " make the dos session Wait for the called program to close. Hence you won't have 500 NWCs simultaneously, only one at each time.

To create your batch file, copy all your files in a temporary directory, then type:
dir /w *.nwc > foobar.bat
notepad foobar.bat
[remove the 4 first lines and 2 last lines; type in
[enter]start /w
select and copy this (linefeed included), and paste it before each name : Ctrl-Right, Ctrl-V, Ctrl-Right, Ctrl-V...
you should now have each filename, one per line, with start /w before it.]
Now run it:
foobar

for instance, if you got file1.nwc and file2.nwc in the current directory, the command hereover will create foobar.bat containing:

Le volume dans le lecteur C n'a pas de nom
Le numéro de série du volume est 253D-14ED
Répertoire de C:\Mes_documents\madmarsu\music\partitio.ns!\Temp

FILE1.NWC       FILE2.NWC
2 fichier(s) 100 087 octets
0 répertoire(s) 82 124 800 octets libres

and after edition:

start /w FILE1.NWC       
start /w FILE2.NWC

Hope this is clear enough :-)

P.S. Do not forget to feed your printer :-)

Re: Printing 500 songs

Reply #5
Dominique: I am a relative dunce with DOS commands and batch files.

I ended up with a batch file that looked like start /w "file.name". The batch file would bring up the file. However, it would not automatically print and then close the file or program. What am I doing wrong? Better yet, could you perhaps post or email the bat file? I suspect it could be useful for many folks who need to print multiple NWC files.

(P.S. I also tried a macro with the windows recorder. However, I am not sure how to get it to pause and allow me to select the file for printing and/or how to cause the macro to run several times in a row. Essentially, when I recorded the macro and selected a file during the recording, the macro [logically] would thereafter only select that file and print it. Any suggestions?)

(P.P.S. to Eric: any chance we could get Noteworthy in the next version to simply print through windows as a registered extension?)

Re: Printing 500 songs

Reply #6
Hi,
I have tried to solve this, using a automation tool called "Rational Visual Test" (RVT). I have written a script (see below) to automat Open-Print-Close cycle using RVT.
The script is well commented to make it easy to understand every line of code.

This RVT allows us to simulate key-presses and mouse-clicks apart from many other useful features...
Visit "http://www.rational.com/products/visual_test/index.jtmpl" to know more about "Visual Test"

An Evaluation version of this is available in this location... but I have not tried it
(My script was written using licenced version... hope it works in evaluation version as well)

Please Cut & Paste the following text in say 'notepad' to view this properly...

To execute...
1. Open RVT

2. Cut & Paste the following text in a new file in RVT. Save it as <filename.mst>

3. Click on <Test/Compile...>

4. click on <Test/Go>

5. Do not use keyboad/mouse till the script is over.

'===========================================================
'PrintNWC.mst
'===========================================================
'This script was written in "Rational Visual Test 4.0r"
'The script language look (somewhat) like the good old "BASIC"
'Visit "http://www.rational.com/products/visual_test/index.jtmpl" to know more about "Visual Test"

DIM NWC_File_Name   As String
DIM Count         As Integer

'Executes NWC (please check the location of nwc32.exe in your machine and change the following line if required)'
run "C:\progra~1\notewo~2\nwc32", NOWAIT , SW_NORMAL

'Opens the text file containing the file names of all the .nwc files that need to be printed.
'(please check the location and name of the text file in your machine and change the following line if required)'
'To creat this "songlist.txt", type "dir *.nwc /b > songlist.txt" (without "") in DOS prompt
Open "c:\t\songlist.txt" For Input As #1

Count=0 ' Inititalising the Count

   Do                           'Repeats "Open-Print-Close" cycle till the end of "songlist.txt"
      LINE INPUT #1,NWC_File_Name      'Reads the .nwc filenames, one at a time

      WMenuSelect("&File\&Open...")   'Invoke "Open" dlgs that .nwc file in NWC
      Play "c:\t\"+NWC_File_Name      'Types the folder name + file name (U may need 2 change the folder name)
      WButtonClick("&Open")         'Clicks "Open" button

      WMenuSelect("&File\&Print...")   'Opens the "Print" dlg
      WButtonClick("OK")            'Clicks "OK" to start printing

      'sleep 2                  'Uncomment this line and change the value if required

      WMenuSelect("&File\&Close")      'Closes the .nwc File and Clicks on "No" if "Save Confirmation" dlg appears
      If WFndWnd("Save Confirmation") <> 0 Then WButtonClick("&No")
   
      Count=Count+1               'Keeps a count of howmany files were printed
      Print "Printing "+NWC_File_Name   'Displays the filename being printed
   Loop Until EOF(1)               'Loops Until EOF is reached

Print "Number of files Printed : "+ str$(Count)   'Displays howmany files were printed.
Close #1                              'Closes "songlist.txt"
End                                    'Terminates the Script
'===========================================================
'End of PrintNWC.mst
'===========================================================

I'll be happy to help, if you have any problem using this script...

Please give your feed back (even if it works perfectly ???)

Happy Printing
- Sam

Re: Printing 500 songs

Reply #7
Oooh... the format of the script looks horrible...
Whatever indentation I had given seems to have lost...

Please note that, any text which appear after a single quote ( ' ) is a comment...
If you insert few tabs after each ', it will be more readable...

However, if you are viewing the script in RVT, you may not have the problem, since RVT has syntax coloring...

thanks
-Sam

Re: Printing 500 songs

Reply #8
you  listening to this foru... what ever just leave hey theres a website called vmk

 

Re: Printing 500 songs

Reply #9
- I say, young man. Don't you know the King's English?
- Er, no. Is he?