Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I control a command.com window opened by REXX?

54 views
Skip to first unread message

Lee Peedin

unread,
Apr 25, 2003, 11:58:39 AM4/25/03
to
Bill,

I think RexxHide.exe may be what you need to prevent a window from
opening.

If you can't change the C program may I suggest the following to
"prevent" a window from appearing at all.

If the C code (don't know anything about C) is shelling out and
executing something like "rexx myprog.rex", then you will need rename
the rexx.exe on your system to something else and then rename
rexxhide.exe to rexx.exe

If the C code is simply shelling out as in "myprog.rex", and a command
window is opening, then your system has a file association between
Rexx.exe and your Rexx program extension (.rex or whatever). Simply
change that association to be RexxHide.exe

RexxHide.exe has been around at least since version 1.0.3 of Object
Rexx. Just be danged sure there are no "pull" statements in the Rexx
code that is being executed. It's kinda hard to respond to a "pull"
when you can't see it. :-).

If you still need the ability to resize or move, I'll have to do a bit
more research on that.

Please type the following from a command prompt:
c:\> rexx /ver
and report back the results.

On Fri, 25 Apr 2003 15:46:04 GMT, Bill
<mackinmus...@hotmail.com> wrote:

>I'm using Object Rexx for windows NT version 1.
>
>I have a C application that uses a REXX interpreter to validate
>certain fields. I can't change the C application, or what version
>of REXX is being used.
>
>I need to call another program from REXX, and whenever I do, a
>window flashes up on the desktop (similar to opening a command.com
>window from REXX). This other program does what it needs to
>do and exits, but the window overwrites my GUI display until
>going to another field causes a screen update.
>
>Does anyone know how I can control the size or position of the
>window that gets opened by REXX when I run my other application?
>If I could move it down out of the way, or make it smaller,
>everything would be fine. Thank you.
>
>(Remove the NOSPAM to reply directly, or just post here.)
>
>hfdi...@netscape.net

Lee Peedin
VP RexxLA
0101001001100101011110000111100001010000011001010111001001110100

Lee Peedin

unread,
Apr 25, 2003, 12:36:14 PM4/25/03
to
OK,
How do you "call another program from REXX" from Rexx (what syntax are
you using)? I the called program another Rexx script - if not then
the RexxHide isn't any help here. I'll see what I can find concerning
sending a parameter to command.com.

Lee

On Fri, 25 Apr 2003 16:13:57 GMT, Bill
<mackinmus...@hotmail.com> wrote:

>Lee,
>
>'rexx /ver' says I'm using "IBM Object REXX Interpreter Version
>1.0.3.0."
>
>My rexxhide.exe and rexx.exe are exactly the same size (49,152 bytes).
>I move rexx.exe to rexxshow.exe and move rexxhide.exe to rexx.exe.
>I never use the PULL statement.
>
>Still did the same thing. My REXX window is never visible when it
>does its work. It's when it makes the system call to my other
>program that a window opens and screws things up. So maybe I
>need a way to pass a parameter to command.com so when it opens,
>it does so minimized or hidden...
>
>Bill.

Lee Peedin

unread,
Apr 25, 2003, 12:48:33 PM4/25/03
to
Bill,
I just verified that RxWinExec is available IBM Object REXX
Interpreter Version1.0.3.0

This might do it for you:
rv = RxWinExec(myprog,SHOWMINNOACTIVE)

Be sure to see the note in the documentation concerning "non-windows"
programs (you will need to edit or create a pif file for them).


In the event that you don't have the documentation loaded here it is:
-RxWinExec(-cmdline--+-------------+--)----------------------><
'-,--cmdshow--'

Runs the application as specified in cmdline.
Parameters:

cmdline
A string containing a file name and optional parameters for the
application to be executed. If the name of the executable file in
cmdline does not contain a directory path, RxWinExec searches for the
executable file in this sequence:
1 The directory from which Object REXX was loaded.
2 The current directory.
3 The Windows system directory.
4 The Windows directory.
5 The directories listed in the PATH environment variable.

cmdshow
Specifies how a Windows-based application window is to be shown. For a
non-Windows-based application, the PIF file, if any, for the
application determines the window state.

SHOWNORMAL
Activates and displays a window.

SHOWNOACTIVATE
Displays the window while the current active window remains active.

SHOWMINNOACTIVE
Displays the window as a minimized window, the current active window
remains active.

SHOWMINIMIZED
Activates the window and displays it as a minimized window.

SHOWMAXIMIZED
Activates the window and displays it as a maximized window.

HIDE
Hides the window and activates another window.

MINIMIZE
Minimizes the specified window and activates the next top-level window
in the Z order.

Return codes:
If the function succeeds, the return value is greater than 31;
otherwise, it is one of the following:

0 The system is out of memory or resources.
2 The specified file was not found.
3 The specified path was not found.
11 The EXE file is invalid.

0 new messages