How to position dos window

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
rnrjunction
Posts: 1
Joined: 20 Nov 2008 19:19

How to position dos window

#1 Post by rnrjunction » 20 Nov 2008 19:25

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

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#2 Post by Ed Dyreen » 30 May 2011 04:11

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:

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#3 Post by Ed Dyreen » 30 May 2011 04:39

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...

nitt
Posts: 218
Joined: 22 Apr 2011 02:43

Re: How to position dos window

#4 Post by nitt » 30 May 2011 10:28

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.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#5 Post by Ed Dyreen » 30 May 2011 22:35

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 :)

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: How to position dos window

#6 Post by Cleptography » 30 May 2011 22:39

Why just why.... :cry:

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#7 Post by Ed Dyreen » 30 May 2011 22:45

Why what Cleptography ?

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: How to position dos window

#8 Post by Cleptography » 30 May 2011 22:52

I don't understand any of this. This code what does it do?

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#9 Post by Ed Dyreen » 30 May 2011 22:53

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:
Last edited by Ed Dyreen on 31 May 2011 02:56, edited 1 time in total.

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: How to position dos window

#10 Post by Cleptography » 30 May 2011 23:16

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.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#11 Post by Ed Dyreen » 30 May 2011 23:25

: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.

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: How to position dos window

#12 Post by Cleptography » 31 May 2011 00:01

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.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#13 Post by Ed Dyreen » 31 May 2011 00:28

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 ?

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: How to position dos window

#14 Post by Cleptography » 31 May 2011 00:54

How does any virtualization software prevent bad code from being executed?

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to position dos window

#15 Post by Ed Dyreen » 31 May 2011 00:58

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:

Post Reply