TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mikko Hyvarinen
from: Dmitry M Golubovsky
date: 1996-11-12 10:24:36
subject: Setting the program title with TShe

Hello Mikko!

Sun Nov 10 1996 13:03, Mikko Hyvarinen wrote to All:

 MH> Is there a way to set the program title when running under TShell?
 MH> WinSetTitle bombs out with an exception.

Here is my example of TSHELL configuration. Titles that are in
"AddOS2Program" statements appear in the right frame of TSHELL
when programs are running. Did you want this?

You must have a PGMSHELL.EXE to run this script by issuing PGMSHELL SET_TSH.CMD

Many cases of calling Win.... functions under TSHELL cause an exception.

=== Cut === SET_TSH.CMD ===

    /* rexx program to modify tshell */

    if 'PGMSHELL'  address() then do
      say 'Expected PGMSHELL environment.'
      say 'Usage:  PGMSHELL '
      return 2
    end

    /* CShell does not spool, so reduce parallel port timeout
    from 120 to 5 seconds in case you accidentally hit print-screen
    and there is no printer hooked up. */
    /*rc = SetParallelTimeout( "LPT1", 5 )*/

    /* title text for the start list  */
    rc = SetStartTitle( "Start Group" )

    /* title text for the running list  */
    rc = SetRunningTitle( "Running Group" )

    /* Add OS2 program; arguments: title, startup dir, parameters, exe */
    rc = AddOS2Program( "OS/2 Command prompt",,,"CMD.EXE")
    rc = AddOS2Program( "File Commander",,,"e:\fc\fc.exe")
    rc = AddOS2Program("Golden
Edit","G:\FIDO\GOLDED",,"G:\FIDO\GOLDED\GED2.EXE")
    rc = AddOS2Program( "Unix Shell","H:\","/C
D:\KSHELL.CMD","CMD.EXE")
    rc = AddOS2Program( "GNU Info
Viewer","H:\","/C
h:\emx\bin\infr.cmd","CMD.EXE")
/* is configured for DOS? */
    if QueryDOSCapable() then do

      /* Add DOS program; arguments: title, startup dir, parameters, settings stem */
      drop settings
      settings.0 = "EMS_MEMORY_LIMIT=8192"
      settings.1 = "XMS_MEMORY_LIMIT=8192"
      settings.3 = "DPMI_DOS_API=ENABLED"
      settings.4 = "DPMI_MEMORY_LIMIT=8"
      rc = AddDOSProgram("Norton Commander",,"/c
c:\nc\nc.exe","settings")
      drop settings

    end

    /* add shutdown option. arguments: title, completion msg */
    rc = AddShutdown( "Shutdown", "Shutdown Complete" )
    return 0
=== Cut ===

                                     [TEAM OS/2 Member DG008]

Dmitry

--- GoldED/2 2.50.Beta5+
* Origin: DMG At Work, dmg{at}gate.la.spb.ru (2:5030/397.102)
SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1
@PATH: 5030/397 5020/79 5100/8 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.