China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-23 23:59
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to make the batch start automatically enter full screen mode? View 9,718 Replies 24
Floor 16 Posted 2007-10-25 12:59 ·  中国 河南 濮阳 联通
新手上路
Credits 19
Posts 15
Joined 2007-10-17 16:20
18-year member
UID 99982
Gender Male
Status Offline
Originally posted by vlanmaster at 2007-1-12 08:27 AM:
To the person above, setting both width and height to 200 is not full screen.
Of course I know the Alt+Enter combination key, and I want the effect of Alt+Enter. But it's not about pressing Alt+Enter after entering. It's about directly entering this mode. Thanks.


I copied this code, saved it as 1.bat, ran it, and then it喀吧automatically closed, then crashed and restarted………………
!!!!!!!!!!!!!!!!!??????????
Floor 17 Posted 2008-06-21 02:10 ·  法国 奥弗涅-罗讷-阿尔卑斯 里昂大都会 里昂
高级用户
★★
Credits 783
Posts 268
Joined 2006-12-26 17:18
19-year member
UID 74627
Gender Male
Status Offline
e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20


Brother redtek's this code is really wonderful, translate it for everyone to study


MOV AH,00
MOV AL,12
INT 10
MOV AL,03
INT 10
INT 20


[ Last edited by PPdos on 2008-6-20 at 07:13 PM ]
菩提本无树,明镜亦非台,本来无一物,何处惹尘埃.
Floor 18 Posted 2008-06-21 02:17 ·  中国 上海 东方有线
新手上路
Credits 16
Posts 17
Joined 2008-04-08 14:54
18-year member
UID 115249
Gender Male
Status Offline
@echo off

:: Setting: Run in full-screen mode
echo exit|%ComSpec% /k prompt e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20 $_g$_q$_|debug>nul

chcp 437>nul
graftabl 936>nul


:rem Put any commands below...
cmd
Floor 19 Posted 2008-06-23 08:55 ·  中国 广西 钦州 电信
初级用户
Credits 37
Posts 13
Joined 2008-04-14 20:49
18-year member
UID 115898
Gender Male
Status Offline
The people upstairs are too enthusiastic............
Okay..............
Continue to carry forward this kind of spirit
Floor 20 Posted 2008-08-21 15:26 ·  中国 湖南 岳阳 平江县 电信
新手上路
Credits 2
Posts 1
Joined 2008-08-21 14:59
17-year member
UID 123776
Gender Male
From 黄花山
Status Offline
I tried it, and it really works. Admiration!!
But I tried it and found that the displayed text is all flattened. Why is that?
I'm very noob, just learning DOS. Hope the experts give more guidance!!!
Floor 21 Posted 2008-08-22 23:05 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
Fullscreen tool FSTOGGLE.EXE (30.5KB)

FSTOGGLE.EXE usage:

fstoggle toggles the display mode
fstoggle 1 switch to fullscreen mode
fstoggle 0 switch to windowed mode
fstoggle ? print the display mode (0 or 1)

Any other syntax shows this message.

In any case, FSTOGGLE returns 0 or 1, indicating
the display mode as it exits.
Floor 22 Posted 2008-08-23 01:56 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
So profound
Can only be applied, cannot be understood
Floor 23 Posted 2008-11-06 09:48 ·  中国 广西 南宁 电信
初级用户
★★
Credits 176
Posts 78
Joined 2007-04-15 10:53
19-year member
UID 85268
Gender Male
Status Offline
I'm learning assembly. Brother redtek's code gives another example. I can only understand the literal meaning, but not the essence. I'll keep working hard. Thanks to Brother redtek for the wonderful code.
Floor 24 Posted 2008-11-06 18:23 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Floor 25 Posted 2009-11-18 21:15 ·  中国 陕西 西安 电信
新手上路
Credits 19
Posts 19
Joined 2009-11-03 19:24
16-year member
UID 154116
Gender Male
Status Offline
==============================
@echo off
if not "%1"=="" goto restart
::"Cannot be removed
reg add hkcu\console\ /v fullscreen /t REG_DWORD /d 1 /f >nul
start "" %0 hello
exit
::Open this batch again and exit the first one. The "hello" is the passed parameter, which can be changed randomly as long as it is not empty.
:restart
reg add hkcu\console\ /v fullscreen /t REG_DWORD /d 0 /f >nul

::Put the code below

==============================
The above was seen by me from a post in this forum and shared with you;
In addition, I also thought of a similar method, as follows:
The comments are similar to the above code.

==============================
@echo off
if "%control%"=="0" goto restart
::"Cannot be removed
reg add hkcu\console\ /v fullscreen /t REG_DWORD /d 1 /f >nul
set control=0
start "" %0
exit
:restart
reg add hkcu\console\ /v fullscreen /t REG_DWORD /d 0 /f >nul

::Put the code below

==============================
Personally, the second code has an advantage. If there are commands in the code that will jump out of full screen, such as shutdown, start taskmgr, etc. To automatically restore full screen again (the previous batch will of course close the full screen), it is simpler than the first one.

Example:
==============================
@ echo off
if "%control%"=="0" goto b
if not "%1"=="" goto a
reg add hkcu\console\ /v fullscreen /t REG_DWORD /d 1 /f >nul
start "" %0 u
exit

:a
set control=0
start taskmgr.exe
start "" %0
exit

:b
reg add hkcu\console\ /v fullscreen /t REG_DWORD /d 0 /f >nul
echo ok
pause
==============================
In this example, the first full screen uses code 1, and the second uses code 2;
In fact, the first full screen can use either of the two codes, but the form of code 2 will be simpler for the following.

[ Last edited by bubblange on 2009-11-18 at 21:41 ]
Forum Jump: