How to use macros

428 views
Skip to first unread message

Mickey Mortimer

unread,
Jan 27, 2018, 3:23:07 AM1/27/18
to TNT-Tree Analysis using New Technology
Hi everyone.  I'm trying to figure out how to use macros in TNT.  I have the stats.run file in the same directory as TNT and my matrix file.

If I type "stats" after running an analysis, TNT gives the error message-

Unknown command: stats
stats;
      ^

If I type "run stats", TNT gives the error message-

Can't open C:\Windows\system32\stats
run stats;
           ^
TNT is not in the Windows folder, it's in another folder in the C drive, so I'm not sure why that happens.  Similarly, if I type "proc stats" I get-

Can't open C:\Windows\system32\stats
proc stats;
          ^

What am I missing?  Thanks for any help!

Miguel Moreno-Azanza

unread,
Jan 27, 2018, 3:49:31 AM1/27/18
to tnt-tree-analysis-using-new-technology
Hi Mickey
The problem you are having is that tnt thinks you are in another directory. to navigate to another directory, just use the old call directory command cd. So, if TNT scripts are is in c:\programs\tnt\scripts you should type

cd c:\programs\tnt\scripts

and them you will be able to call the script typing its name. Also, cd.. is used to go back a directory, just like it used to be in MSDOS

I strongly recommend to my students to install TNT in a directory with a very short path (such as C:\tnt) because longer routes will cause problems using some scripts
hope this helps.

--
Miguel Moreno-Azanza, PhD.

Departamento de Ciências da Terra,
Faculdade de Ciências e Tecnologia,
FCT, Universidade Nova de Lisboa,
2829-526 Caparica, Portugal   

--
Has recibido este mensaje porque estás suscrito al grupo "TNT-Tree Analysis using New Technology" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a tnt-tree-analysis-using-new-technology+unsubscribe@googlegroups.com.
Para publicar en este grupo, envía un correo electrónico a tnt-tree-analysis-using-new-techn...@googlegroups.com.
Visita este grupo en https://groups.google.com/group/tnt-tree-analysis-using-new-technology.
Para acceder a más opciones, visita https://groups.google.com/d/optout.

caprico...@gmail.com

unread,
Jan 28, 2018, 6:02:47 PM1/28/18
to TNT-Tree Analysis using New Technology
I have always initiated my scripts by including the file extension. Maybe that might help?

e.g. 
proc stats.run;

Best of luck!

Best,
Jason

Mickey Mortimer

unread,
Feb 4, 2018, 5:30:46 PM2/4/18
to TNT-Tree Analysis using New Technology
Thanks to both of you!  Using the cd command and the format of "proc.stats.run" both worked and it was a success.

Mickey
Reply all
Reply to author
Forward
0 new messages