Hi,i want to make a batch file that will always open in a small window
like
______________________________
|TITLE _ X |
|_____________________________|
| text |
| |
| text |
|_____________________________|
I have seen a batch file that was opening in a small window like this,but it was compiled to exe and i couldnt see the code.
Thanks in advance
Running batch file in small window
Moderator: DosItHelp
Re: Running batch file in small window
Code: Select all
mode con cols=30 lines=10
pause
Re: Running batch file in small window
MODE CON: has a diabolical bug
it not only sets the size of the window,
it simultaneously sets the buffer size,
hence there are no scroll bars and once you get to the bottom of the window everything that goes above the top is forgotten history.
That is my experience under Windows 7 Ultimate.
Is there any way to avoid this loss of history please,
either an undocumented option with Mode CON:,
or a totally different way of doing things ?
NB I am not as desperate for a solution as when I first hit this feature,
For my specific needs I merely had to set the width to a larger default size to accommodate longer text lines without wrap-around,
and that left the vertical sizes of display and buffer at their different default sizes.
Regards
Alan
it not only sets the size of the window,
it simultaneously sets the buffer size,
hence there are no scroll bars and once you get to the bottom of the window everything that goes above the top is forgotten history.
That is my experience under Windows 7 Ultimate.
Is there any way to avoid this loss of history please,
either an undocumented option with Mode CON:,
or a totally different way of doing things ?
NB I am not as desperate for a solution as when I first hit this feature,
For my specific needs I merely had to set the width to a larger default size to accommodate longer text lines without wrap-around,
and that left the vertical sizes of display and buffer at their different default sizes.
Regards
Alan
Re: Running batch file in small window
'
Hi Alan,
CMDOW respects screen buffers, but is a false positive to many AV-software
I wouldn't worry about it though, some anti-virus software used kernel-hooking ( dangerous ), and many use rootkits even today. Pointing the finger at someone else is just ridiculous
Hi Alan,
CMDOW respects screen buffers, but is a false positive to many AV-software
Code: Select all
@echo off
cmdow run /?
cmdow.EXE /? /siz
cmdow.EXE @ /siz 300 300
pause
Code: Select all
CMDOW [Version 1.4.3] Win32 Commandline Window Utility for NT4/2000/XP.
(C) Copyright 2001-2004 Ritchie Lawrence, http://www.commandline.co.uk.
CMDOW [window | /T] [/B] [/F] [/P]
CMDOW /TH | /TV | /MA | /CW | /UW | /AT | /FS | /WM
CMDOW window {[/ACT] [/INA] [/ENA] [/DIS] [/VIS] [/HID] [/MIN] [/MAX] [/RES]
[/TOP] [/NOT] [/REN caption] [/MOV left top] [/SIZ width height] [/CLS]
[/END]}
CMDOW /RUN [state] file [args]
window List specified window (if omitted, all windows are listed).
/T List windows only shown on the taskbar.
/B List windows using bare format (no heading information).
/F List windows showing full information (don't truncate any fields).
/P List windows showing position and size (left, top, width and height).
/TH Tile windows horizontally. /TV Tile windows vertically.
/MA Minimize all windows. /CW Cascade windows.
/UW Undo tile/minimize/cascade. /AT Intelligent [Alt]-[Tab]
/FS Switch to full screen mode. /WM Switch to window mode.
/ACT Activate specified window. /INA Inactivate specified window.
/ENA Enable specified window. /DIS Disable specified window.
/VIS Unhide specified window. /HID Hide specified window.
/MIN Minimize specified window. /MAX Maximize specified window.
/RES Restore specified window. /REN Rename specified window.
/TOP Make window always on top. /NOT Make window not always on top.
/MOV Move specified window. /SIZ Resize specified window.
/CLS Close specified window. /END Kill process linked to window.
/RUN Executes or opens specified file using associated application.
state Initial show state of window (/MIN, /MAX or /HID). Default is normal.
args Optional commandline arguments passed to launched application.
Specify a window by its caption (case insensitive) or handle in hex format.
The At symbol '@' may be used to refer to this window. For more help on any
parameter use CMDOW /? <parameter>. Eg CMDOW /? /RUN or CMDOW /? window.
This form of CMDOW performs specified action(s) on the specified window.
Some of these commands allow you to manipulate windows in ways not normally
possible. Improper use may cause unexpected results and system instability.
CMDOW window {[/ACT] [/INA] [/ENA] [/DIS] [/VIS] [/HID] [/MIN] [/MAX] [/RES]
[/TOP] [/NOT] [/REN caption] [/MOV left top] [/SIZ width height] [/CLS]
[/END]}
window Window to perform action(s) on. Specify a window by its unique handle
in hexadecimal format (0x1A0142) or its caption. Windows without
captions can be specified by their ClassName. The At symbol '@', may
be used to refer to this window. ie 'CMDOW @ /HID'
/REN Renames the caption of the specified window to the caption specified
after /REN. Use double quotes for captions containing whitespace.
/MOV Moves the specified window. The left and top arguments specify the
new position of the left top corner of the window. For level one
windows this relative to the desktop, and for child windows this is
relative to its parent window. Level one windows can be moved off the
screen using negative coords or coords greater than the desktop size.
You should not move a minimized or maximized window without first
restoring it.
/TOP Makes the specified window always on top. It will remain on top even
when another window is activated. If two or more windows have this
attribute set, the topmost window will be that which had the
attribute set first.
/NOT Makes window not always on top. This is the normal setting for most
windows.
/SIZ Resizes the specified window. The width and height arguments specify
the new absolute width and height. In general, windows cannot be made
smaller using /SIZ than they could if using conventional methods. You
should not resize a minimized or maximized window without first
restoring it.
/CLS Politely asks the specified window to close. Most applications will
repsond to this request, although some may display a message box
asking you what to do with unsaved work.
/END Kills the process associated with the specified window, the result is
all windows with the same Pid are also killed. Use very carefully.
If more than one window matches the specified caption, CMDOW uses the first
one found. Multiple actions are performed in order, from left to right. Eg
CMDOW 0x0E0144 /hid /ren "10% complete" /mov 0 0 /siz 300 100 /act /vis
Re: Running batch file in small window
I have no qualms about the safety of your recommendation,
BUT
I am creating a BAT script for use by novices on a different forum,
and the moderators there may ban a link to a utility that triggers A.V. alerts.
I want to stay within the confines of what is built into Windows XP and upwards
Regards
Alan
BUT
I am creating a BAT script for use by novices on a different forum,
and the moderators there may ban a link to a utility that triggers A.V. alerts.
I want to stay within the confines of what is built into Windows XP and upwards
Regards
Alan
Re: Running batch file in small window
Haha, you're right Alan. But CMDOW is an old well-known tool. I don't use it because my A.V. don't like it. (But it also don't like some of my own harmless tools written in C++ )
Regards
aGerman
Regards
aGerman