faqts : Computers : Programming : Languages : Tse : Macro

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 2 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

TSE: Compile: How to compile a TSE macro file?

Jun 28th, 2003 09:22
Knud van Eeden,


-----------------------------------------------------------------------

--- Knud van Eeden - 13 November 2001 - 02:10 am ----------------------

Steps: Overview:

 1. -Load your macro

 2. -Compile your macro

 3. -Execute your macro

---

Steps: Worked out:

1. Make sure the text of your macro
   (e.g. via menu 'File'->'Load',
   or clipboard copy/paste)
   is loaded in your TSE editor

    for example:

     PROC Main()
      Warn( 'hello world from TSE' )
     END

     <F12> Main()

2. Give this file the extension .s
   (e.g. via TSE menu 'File'->'Changename')

   for example, name this file:

    mytext.s

3. To compile this text,

   you can use any of the following possibilities:

   3.1 by pressing the keys

       <CTRL><F9>

   3.2 via the TSE main menu,

        choose 'Macro',

         'Compile'

           and press <ENTER>

   3.3 use the TSE command line compiler

       e.g. type on the DOS command line
            (via 'Start'->'Programs'->'Accessoiries'),
            or in a Windows run box (via 'Start'->'Run')

            in general, type:

       <name of the TSE command line compiler> <your TSE source file>

              if TSE v2.5, type:

               c:\tse\sc.exe mytext.s

              if TSE v2.8, v3.0 or v4.0, type:

               c:\tse\sc32.exe mytext.s

        PS You can use this last method to automate the compilation,
        e.g. via a batch file or via the Dos() command
        in TSE

4. If successfully compiled, that is no errors, this will create a file
   with the same name but with the extension .mac (e.g. mytext.mac)
  (in the same directory as the corresponding .s file)

5. If you want to rerun this macro .mac file (later),
   you can use any of the following possibilities:

   5.1 via the TSE main menu,
        choose 'Macro',
         'Execute'
           and type the name of your macro file

            e.g. 
   
             mytext.mac

            then <ENTER>

   5.2 to run and execute the macro from the command line,
       start TSE with parameter -e followed by the name of this 
macrofile
       ('e' means here 'e'xecute)

       e.g. type on the DOS command line
            (via 'Start'->'Programs'->'Accessoiries'),
            or in a Windows run box (via 'Start'->'Run')

            the command:

             <your TSE executable filename> -e<your macro name>

           e.g.

            if TSE v2.5, type:

             c:\tse\e.exe -emytext.mac

            if TSE v2.8 or v3.0, type:

             c:\tse\e32.exe -emytext.mac

            if TSE v4.0, type:

             c:\tse\g32.exe -emytext.mac

   5.3 to load the macro from the command line
      (but not execute), start TSE with the
       parameter -l followed by the name of this macrofile
       ('l' means here 'l'oad)

       e.g. type on the DOS command line, or in a Windows run box
       (via 'Start'->'Run') the command:

          <your TSE executable filename> -l<your macro name>

            if TSE v2.5, type:

             c:\tse\e.exe -lmytext.mac

            if TSE v2.8 or v3.0, type:

             c:\tse\e32.exe -lmytext.mac

            if TSE v4.0, type:

             c:\tse\g32.exe -lmytext.mac

   5.4 possibly add this macro (if you think it is interesting to
       execute this macro while starting up your TSE)
       to the macro autoload list,
       via the TSE main menu,
        'Macro'
         'Autoload list'
           press the 'Insert' key
            and give the path to the macro
            (e.g. c:\tse\mac\mytext.mac)

-----------------------------------------------------------------------