#498 SysSetTitle to set the title of the Command Prompt Window

None
closed
None
none
5
2012-12-01
2012-11-20
Swifty
No

If you use the "title" command in a Command Prompt window, it sets the window's title.
If you execute the "title" command from inside REXX, nothing happens, because REXX creates a new cmd.exe process, and that has no control over the title of the window running your REXX.

Would it be possible to add a SysSetTitle function, so that the title of the command prompt window can be easily changed?

Related

Feature Requests: #498

Discussion

  • jfaucher

    jfaucher - 2012-11-20

    Can't tell if the RFE will be accepted or not, but in the meantime, you can use GCI to call the function SetConsoleTitleA.
    http://rexx-gci.sourceforge.net/
    If you use ooRexx 32 bits then you can download directly gci.dll
    If you use ooRexx 64 bits then you will have to build the 64 bits version of gci.dll (I can send it to you).
    See the attached file for an example.

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-11-20

    I wanted to point out that we have had a discussion on the developer's list a couple of years ago concerning RexxUtils.

    For similar, but slightly different reasons, both Rick and I were opposed to adding new functions to RexxUtils. I am especially opposed to adding new, platform dependent, functions to RexxUtils.

    I'm not opposed to adding something that gives this functionality to one of the Windows only extensions, such as winsystm.cls. However, it may be that winsystm.cls already has something close to allowing this. I'm not sure how "easy" it is to use.

    I'll take a look into it when I get a chance.

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-11-20

    We already have this functionality in winsystm.cls, in the WindowsManager class.

    I'll attach the example program for anyone that might want to download it, but here is the code:

    wm = .WindowsManager~new
    wm~consoleTitle = 'My Most Excellent Rexx Program'
    
    say 'This program is doing stuff'
    do 10
      j = SysSleep(3)
      say 'Still doing stuff'
    end
    
    say 'Done now.'
    

    ::requires 'winsystm.cls'

    When you run the program from a command prompt window, the title of window changes to My Most Excellent Rexx Program. When the program quits, the title reverts to what it was.

    Steve, let me know if this is sufficient for your needs.

     
  • Swifty

    Swifty - 2012-11-20

    I fully understand your position. Something in winsystm.cls would be fine
    as far as I'm concerned, and it doesn't matter how hard/obscure it is to
    use; I can always put the code in my subroutine library (and call the
    function WinSetTitle() :-)

    On 20 November 2012 16:37, Mark Miesfeld miesfeld@users.sf.net wrote:

    I wanted to point out that we have had a discussion on the developer's
    list a couple of years ago concerning RexxUtils.

    For similar, but slightly different reasons, both Rick and I were opposed
    to adding new functions to RexxUtils. I am especially opposed to adding
    new, platform dependent, functions to RexxUtils.

    I'm not opposed to adding something that gives this functionality to one
    of the Windows only extensions, such as winsystm.cls. However, it may be
    that winsystm.cls already has something close to allowing this. I'm not
    sure how "easy" it is to use.

    I'll take a look into it when I get a chance.

    Status: unread
    Created: Tue Nov 20, 2012 06:55 AM UTC by Swifty
    Last Updated: Tue Nov 20, 2012 04:14 PM UTC
    Owner: nobody

    If you use the "title" command in a Command Prompt window, it sets the
    window's title.
    If you execute the "title" command from inside REXX, nothing happens,
    because REXX creates a new cmd.exe process, and that has no control over
    the title of the window running your REXX.

    Would it be possible to add a SysSetTitle function, so that the title of
    the command prompt window can be easily changed?


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/498/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

    --
    Steve Swift
    http://www.swiftys.org.uk

     
  • Swifty

    Swifty - 2012-11-20

    I am using ooRexx (64) so I'd welcome a 64-bit gci.dll (I'm not into
    building my own). However, your gcititle.rex didn't make it to my inbox, so
    you'd best send it directly to steve.j.swift@gmail.com, thank you! (And a
    copy of your gcititle.rex, please)

    On 20 November 2012 16:14, jfaucher jfaucher@users.sf.net wrote:

    Can't tell if the RFE will be accepted or not, but in the meantime, you
    can use GCI to call the function SetConsoleTitleA.
    http://rexx-gci.sourceforge.net/
    If you use ooRexx 32 bits then you can download directly gci.dll
    If you use ooRexx 64 bits then you will have to build the 64 bits version
    of gci.dll (I can send it to you).
    See the attached file for an example.

    Attachment: gcititle.rex (1.6 kB; application/octet-stream)

    Status: unread
    Created: Tue Nov 20, 2012 06:55 AM UTC by Swifty
    Last Updated: Tue Nov 20, 2012 06:55 AM UTC
    Owner: nobody

    If you use the "title" command in a Command Prompt window, it sets the
    window's title.
    If you execute the "title" command from inside REXX, nothing happens,
    because REXX creates a new cmd.exe process, and that has no control over
    the title of the window running your REXX.

    Would it be possible to add a SysSetTitle function, so that the title of
    the command prompt window can be easily changed?


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/498/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

    --
    Steve Swift
    http://www.swiftys.org.uk

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-12-01

    Steve I'm closing this because the functionality is already implemented in the winsystm.cls

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-12-01
    • status: unread --> closed
    • assigned_to: Mark Miesfeld
    • milestone: v4.2.0 --> None
     
  • Swifty

    Swifty - 2012-12-01

    Ah, yes. I would have closed this myself, but in the never-ending rush of
    post-retirement tasks, I never got round to it.

    On 1 December 2012 06:39, Mark Miesfeld miesfeld@users.sf.net wrote:

    • status: unread --> closed
    • assigned_to: Mark Miesfeld
    • milestone: v4.2.0 --> None

    Status: closed
    Created: Tue Nov 20, 2012 06:55 AM UTC by Swifty
    Last Updated: Tue Nov 20, 2012 04:55 PM UTC
    Owner: Mark Miesfeld

    If you use the "title" command in a Command Prompt window, it sets the
    window's title.
    If you execute the "title" command from inside REXX, nothing happens,
    because REXX creates a new cmd.exe process, and that has no control over
    the title of the window running your REXX.

    Would it be possible to add a SysSetTitle function, so that the title of
    the command prompt window can be easily changed?


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/498/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

    --
    Steve Swift
    http://www.swiftys.org.uk

     

    Related

    Feature Requests: #498


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks