INTERNAL: Printing Chroma-Coded Code on the PC.
Anonym
Topic:
How can I print chroma-coded IDL code on a PC?Discussion:
1. Install the attached A2PS utility on your PC to c:\a2ps
a2ps-dos.exe
2. Edit your Autoexec.bat file to add the lines :-
SET USER=my name !Note: No spaces before/after equals sign!
PATH C:\a2ps\bin;%PATH%
*** Now SHUTDOWN your computer and reboot! ***
3. Start IDL, and click on the "Macros" selection at the top of the IDLDE panel, and then click on "Edit..."
4. Click the "Add..." button at the top right of the Edit widget.
5. Enter a meaningful name, e.g. Print Chroma Code, and click OK.
6. That newly named Macro now appears highlighted in the list of macros.
7. In the IDL Command edit field enter as one line (printer of your choice...) :-
SPAWN,/NOWAIT,/HIDE,/LOG, "a2ps --pret=idl --pro=color %F -o C:\RSI\mycolorfile.ps"
8. Against Menu item name enter something meaningful, e.g. Print Chroma Code
9. Against Tooltip text enter something meaningful, e.g Print Chroma Code
10. Against Status bar text enter something meaningful
11. Click the OK button if all is correct.
12. Exit IDL.
13. Start IDL, and click "Macros" to confirm that your new macro exists.
14. Open an IDL source file (a small file to start with), click on Macros and your new Chroma macro, and you should see a message of this format appear in the IDL Log window :-
IDL> SPAWN,/NOWAIT,/HIDE,/LOG, "a2ps --pret=idl --pro=color
C:\MY_IDL_CODE\animate.pro -o
C:\RSI\mycolorfile.ps"
15. Note that you will not receive any confirmation that the job has printed. You shouldn't see any errors in the IDLDE log window.Solution:
[Edit this field in the IDL-based Tech Tip Editor, v60]