Page 1 of 2

How to position dos window

Posted: 20 Nov 2008 19:25
by rnrjunction
Hi Guys

I am just trying to figuer out how to position the DOS window on the screen

For example
below simple bat file display the window on top left corner of the screen.
How do I get the output in the middle of the screen

@ECHO OFF
mode con lines=5
ECHO "hello World"
pause



thanks in advance

Re: How to position dos window

Posted: 30 May 2011 04:11
by Ed Dyreen
Hello, you still there :lol:

I'm sorry, I've let you wait 3 years but, the cat was hungry 8)

Code: Select all

:: CMDOW
::(
for %%? in ( CMDOW.MIN ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 0 "^^^!FullPathFile.CMDOW^^^!" @ /act /min &&set /a CMDOW.STATE = 0 ) "
for %%? in ( CMDOW.WIN ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 1 2^>nul pushd "^^^!FullPath.CMDOW^^^!" &&( "CMDow.EXE" @ /act /res &"CMDow.EXE" /wm &&set /a CMDOW.STATE = 1 &popd ) ) "
for %%? in ( CMDOW.WinMin ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 0 %CMDOW.WIN% %()% &"^^^!FullPathFile.CMDOW^^^!" @ /act /min &&set /a CMDOW.STATE = 0 ) "
for %%? in ( CMDOW.FS ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 2 if ^^^!Sjablon.FS^^^! gtr 0 2^>nul pushd "^^^!FullPath.CMDOW^^^!" &&( "CMDow.EXE" @ /act /res &"CMDow.EXE" /fs &&set /a CMDOW.STATE = 2 &popd ) ) "
for %%? in ( CMDOW.WinFS ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 2 if ^^^!Sjablon.FS^^^! gtr 0 %CMDOW.WIN% %()% &2^>nul pushd "^^^!FullPath.CMDOW^^^!" &&( "CMDow.EXE" @ /act /res &"CMDow.EXE" /fs &&set /a CMDOW.STATE = 2 &popd ) ) "
for %%? in ( CMDOW.Init ) do set "%%~?=set /a CMDOW.STATE = -1 &( if exist "^^^!FullPathFile.CMDOW^^^!" set /a CMDOW.STATE = 0 &%CMDOW.WIN% %()% &"!FullPathFile.CMDOW!" @ /top /dis /mov 100 100 ) "
for %%? in ( CMDOW.Debug.Init ) do set "%%~?=set /a CMDOW.STATE = -1 &( if exist "^^^!FullPathFile.CMDOW^^^!" set /a CMDOW.STATE = 0 &%CMDOW.WIN% %()% &"!FullPathFile.CMDOW!" @ /top /mov 100 100 ) "

set /a CMDOW.STATE = -1
::)

This is so much fun, I just can't get enough of it

Why don't u say thanx :lol:

Re: How to position dos window

Posted: 30 May 2011 04:39
by Ed Dyreen
just trying to entertain myself sighhh
I wonder how much annoying would get me banned, well I'm not planning on reregistering.

I wonder who told me it is very unpolite to throw blocks of code at people, well I'm new so..

I will behave for now. :mrgreen:
Let's talk about politics...

Re: How to position dos window

Posted: 30 May 2011 10:28
by nitt
Ed Dyreen wrote:Hello, you still there :lol:

I'm sorry, I've let you wait 3 years but, the cat was hungry 8)

Code: Select all

:: CMDOW
::(
for %%? in ( CMDOW.MIN ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 0 "^^^!FullPathFile.CMDOW^^^!" @ /act /min &&set /a CMDOW.STATE = 0 ) "
for %%? in ( CMDOW.WIN ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 1 2^>nul pushd "^^^!FullPath.CMDOW^^^!" &&( "CMDow.EXE" @ /act /res &"CMDow.EXE" /wm &&set /a CMDOW.STATE = 1 &popd ) ) "
for %%? in ( CMDOW.WinMin ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 0 %CMDOW.WIN% %()% &"^^^!FullPathFile.CMDOW^^^!" @ /act /min &&set /a CMDOW.STATE = 0 ) "
for %%? in ( CMDOW.FS ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 2 if ^^^!Sjablon.FS^^^! gtr 0 2^>nul pushd "^^^!FullPath.CMDOW^^^!" &&( "CMDow.EXE" @ /act /res &"CMDow.EXE" /fs &&set /a CMDOW.STATE = 2 &popd ) ) "
for %%? in ( CMDOW.WinFS ) do set "%%~?=echo.>nul &( if ^^^!CMDOW.STATE^^^! gtr -1 if ^^^!CMDOW.STATE^^^! neq 2 if ^^^!Sjablon.FS^^^! gtr 0 %CMDOW.WIN% %()% &2^>nul pushd "^^^!FullPath.CMDOW^^^!" &&( "CMDow.EXE" @ /act /res &"CMDow.EXE" /fs &&set /a CMDOW.STATE = 2 &popd ) ) "
for %%? in ( CMDOW.Init ) do set "%%~?=set /a CMDOW.STATE = -1 &( if exist "^^^!FullPathFile.CMDOW^^^!" set /a CMDOW.STATE = 0 &%CMDOW.WIN% %()% &"!FullPathFile.CMDOW!" @ /top /dis /mov 100 100 ) "
for %%? in ( CMDOW.Debug.Init ) do set "%%~?=set /a CMDOW.STATE = -1 &( if exist "^^^!FullPathFile.CMDOW^^^!" set /a CMDOW.STATE = 0 &%CMDOW.WIN% %()% &"!FullPathFile.CMDOW!" @ /top /mov 100 100 ) "

set /a CMDOW.STATE = -1
::)

This is so much fun, I just can't get enough of it

Why don't u say thanx :lol:


Doesn't work. I'm quite sure you can't position the DOS window.

Re: How to position dos window

Posted: 30 May 2011 22:35
by Ed Dyreen
DAMN !

Any skilled batcher can see in a blink what is needed to make it work.

You wanne find out ? v you more like nahh don't work :)

Re: How to position dos window

Posted: 30 May 2011 22:39
by Cleptography
Why just why.... :cry:

Re: How to position dos window

Posted: 30 May 2011 22:45
by Ed Dyreen
Why what Cleptography ?

Re: How to position dos window

Posted: 30 May 2011 22:52
by Cleptography
I don't understand any of this. This code what does it do?

Re: How to position dos window

Posted: 30 May 2011 22:53
by Ed Dyreen
reposition the dos window, hide it, minimize, maxi, fullscr..... move etc..

alright then;

1sth of all it is macro code, so it never works, macros don't work, they are called.
2nd you don't even need the code, as it is just a wrap around a program

I could just have written CMDOW @ /top /mov 100 100
which makes
@ >> this window
/top >> ontop
/mov 100 100 >> move to x,y coord

Ah but it does require a proggie CMDOW.EXE but eh can't you google it cause I don't how to put it on here and I lazy :oops:

O yes, if you get an antivirus warning,...Believe them :!: :lol:

Re: How to position dos window

Posted: 30 May 2011 23:16
by Cleptography
I knew I should have not executed any code from this site without some virtual business going on. God my computer is so broken what did you guys do? AVG is telling me I am a cheap stupid bastard.

Re: How to position dos window

Posted: 30 May 2011 23:25
by Ed Dyreen
:shock: Never do that again, Always VM !
That is a golden rule !

My pc has 5backups &1mirrored drive for sensitive data.
In fact sensitive data should always be mirrored &backup up.
You want to risk losing your data ? I don't.

Re: How to position dos window

Posted: 31 May 2011 00:01
by Cleptography
Phew it is a good thing my version of windows is not one you can but in any store. That was a close one.
What does vmware really do? I mean come on now that is nothing to get past.

Re: How to position dos window

Posted: 31 May 2011 00:28
by Ed Dyreen
I mean come on now that is nothing to get past.

I do not understand that.

What does vmware really do?

What u mean Virtual Machine ?

Re: How to position dos window

Posted: 31 May 2011 00:54
by Cleptography
How does any virtualization software prevent bad code from being executed?

Re: How to position dos window

Posted: 31 May 2011 00:58
by Ed Dyreen
using virtual drivers, It is impossible for anything inside a VM to touch a PM.
The only thing that the proggie can do at most is checking wheter it runs in VM.
Virusses use this info to convince idiots they need to run it PM, what an idiots.
It's a good thing virusses exist :twisted:

But how can I be sure you aren't fooling me again, asking me things you already know
You basterd :P

Now YOU tell ME something I don't know, not above my level, not below, but just in between
I know you have secrets :mrgreen: