Entry
TSE: Version: How to check version of currently loaded TSE wordprocessor (v2.5, v2.8, v3.0 or v4.x)?
Oct 28th, 2006 03:47
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 24 October 2001 - 09:47 pm -------------------
Computer: Editor: TSE: Version: Check: How to check the version of the
currently loaded TSE editor?
---
This might come handy for example if you developed macros which should
behave different in different versions of TSE, or when you want to
adapt your (one and only universal) .ui file so that it can be compiled
(without or with little further change) in different versions of TSE --
===
Possible solutions:
===
Method: <CTRL ALT SPACEBAR>
(this will usually be the quickest method)
In the TSE program, press:
<CTRL ALT SPACEBAR>
(this calls e.g. possibly the procedure 'lVersion', which is defined in
your .ui file)
===
Method: Choose in the menu 'Help'->'About'
(this is in line with the default method to find the version in almost
all programs on the Microsoft Windows platform)
Steps: Overview:
1. -Start TSE if necessary
2. -Press key <ESCAPE>
3. -Select from list 'Help'
4. -Select from list 'About'
(or click with the mouse on menu option 'Help', and then 'About')
===
This shows this boxes:
if in TSE v2.5 for DOS:
+--------------------------------------------------------------------+
| |
| The SemWare Editor Professional v2.50e |
| Copyright 1991-1997 SemWare Corp. All rights reserved worldwide. |
| Serial Number: |
| |
+--------------------------------------------------------------------+
if in TSE v2.8:
+--------------------------------------------------------------------+
| The SemWare Editor Professional/32 v2.80j |
| Copyright 1996-1999 SemWare Corp. All rights reserved worldwide. |
| Serial Number: |
| |
| www.semware.com sales@semware.com tech.support@semware.com |
| (770) 641-9002 (800) 467-3692 FAX (770) 640-6213 |
+--------------------------------------------------------------------+
if in TSE v3.0:
+--------------------------------------------------------------------+
| The SemWare Editor Professional/32 v3.00 |
| Copyright 1996-2001 SemWare Corp. All rights reserved worldwide. |
| Serial Number: |
| |
| www.semware.com sales@semware.com tech.support@semware.com |
| (770) 641-9002 (800) 467-3692 FAX (770) 640-6213 |
+--------------------------------------------------------------------+
if in TSE v4.0:
+--------------------------------------------------------------------+
| The SemWare Editor Professional v4.00e |
| Copyright 1996-2003 SemWare Corp. All rights reserved worldwide. |
| Serial Number: |
| |
| www.semware.com sales@semware.com tech.support@semware.com |
| (678) 355-9810 (800) 467-3692 FAX (678) 355-9812 |
+--------------------------------------------------------------------+
===
Method: Run the TSE program without a file
Start TSE as usual, without loading a file
1. -E.g. type the command on the DOS command line
1. -if you use TSE v2.5 or lower:
c:\mypath\e.exe
2. -if you use TSE v2.8 or v3.0:
c:\mypath\e32.exe
3. -if you use TSE v4.0:
c:\mypath\g32.exe
(you will have to adapt the file path 'c:\mypath\' to this exe files
to the situation on your computer)
This will also show this version information as above on screen.
===
Method: Use the variable 'EDITOR_VERSION'
(this internal variable has been introduced from TSE v3.0 and
higher)
So in your macro you could use something like
(tested successfully in TSE v2.5, v2.8, v3.0, v4.0):
--- cut here: begin --------------------------------------------------
PROC Main()
#IFDEF EDITOR_VERSION // thus TSE v3.0, v4.0, ...
#IF EDITOR_VERSION == 0x3000 // TSE v3.0
// do something in TSE v3.0 only
Warn( "TSE v3.0" )
#ENDIF
#IF EDITOR_VERSION == 0x4000 // TSE v4.0
// do something in TSE v4.0 only
Warn( "TSE v4.0" )
#ENDIF
#IF EDITOR_VERSION == 0x4200 // TSE v4.2
// do something in TSE v4.2 only
Warn( "TSE v4.2" )
#ENDIF
#IF EDITOR_VERSION > 0x4200 // TSE v4.x
// versions higher than TSE v4.2
Warn( "version higher than TSE v4.2" )
#ENDIF
#ELSE // thus TSE v1.x, 2.x
// this is one of the internal variables
// new from TSE v2.8 on
#IFDEF WIN32
// do something in TSE v2.8 only
Warn( "TSE v2.8" )
#ELSE
// do something in TSE v1.x, v2.0 or v2.5 only
Warn( "TSE v2.5 (or lower)" )
#ENDIF
#ENDIF
END
<F12> Main()
--- cut here: end ----------------------------------------------------
===
Internet: see also:
---
----------------------------------------------------------------------