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-08-04 10:09
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Help with the scroll bar issue!!!! View 2,227 Replies 15
Original Poster Posted 2007-04-25 12:59 ·  中国 福建 福州 电信
初级用户
Credits 57
Posts 23
Joined 2007-04-23 05:19
19-year member
UID 86157
Gender Male
Status Offline
I'm a newbie, and I want to ask``` why is it that in a batch file, after I connect two programs with GOTO, the scroll bar that was there originally disappears?? Then I can't see all of the output information```` what should I do```
Floor 2 Posted 2007-04-25 13:22 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Show your code first?
Floor 3 Posted 2007-04-25 22:53 ·  中国 福建 福州 电信
初级用户
Credits 57
Posts 23
Joined 2007-04-23 05:19
19-year member
UID 86157
Gender Male
Status Offline
:jincheng


@echo off
color f9
MODE con: COLS=80
title enix's Process Analysis
set space=
echo.
echo The program analysis is as follows:
echo =========================================================================
echo.
echo Process name Process description
echo.

::The program descriptions are defined below; you can add more yourself.
set notepad.exe= Notepad-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
set tasklist.exe= Process list called by Brother Chen Lin

//////////////some omitted
set smss.exe= ------------- Part of the Microsoft Windows operating system. Calls the dialog management subsystem and is responsible for operating the dialogs of your system. Note: it may also be a trojan.--------------------------------------------------------------------------------------------
set snmp.exe= A network-related process that comes with Microsoft Windows. Used for LAN local area network and LAN basic configuration.--------------------------------------------------------------------------------------------------------------------------



set bitcomet.exe= BT download ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
::Main program
setlocal enabledelayedexpansion

for /f "tokens=1" %%i in ('tasklist /NH') do (

set str=%%i %space%
set str=!str:~0,20!

if defined %%i (echo !str! !%%i!) else echo !str! Mm oh ah wo this is an unknown program, go online and look up some info ToT!)
echo =========================================================================
echo Analysis complete...
echo A little explanation: processes are the things currently running on your machine. If it says “Mm oh ah wo unknown program”, that means it's not in my database, so I suggest you check where it came from. If it's a virus, just delete it directly~ generally system processes won't exceed 30; if there are too many, then there's a problem. Open Task Manager and take a look yourself. crtl+alt+del~

pause>nul


title Operating System Optimization
:start

color 17
MODE con: COLS=55 LINES=30
echo.
echo.
echo Windows Xp optimization batch file
echo.
echo Powered By enixChen QQ:21239319
echo.
echo ==============================
echo Please choose the operation to perform, then press Enter
echo ==============================
echo.
echo. 1.Clear unnecessary startup items
echo.
echo 2.Clean system junk
echo.
echo 3.Port operations
echo.
echo 4.Shutdown settings
echo.
echo 5.View processes
echo.
echo 6.Exit
echo.
:cho
set choice=
set /p choice= Please choose:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%

if /i "%choice%"=="1" goto delstart
if /i "%choice%"=="2" goto del
if /i "%choice%"=="3" goto start3
if /i "%choice%"=="4" goto start4
if /i "%choice%"=="5" goto jincheng
if /i "%choice%"=="6" goto end1
echo Invalid choice, please enter again
echo.
goto cho
//some omitted
Floor 4 Posted 2007-04-25 22:57 ·  中国 福建 福州 电信
初级用户
Credits 57
Posts 23
Joined 2007-04-23 05:19
19-year member
UID 86157
Gender Male
Status Offline
What I mean is, if I write just the process analysis code by itself```` then there is buffering and I can see all the results, but if I put them together, the scroll bar is gone``` and I can only see the last part``` how do I change it?
Or, well, I want to write the process analysis results into a text file``` how can I do that

When I use the command below to output the history record, the text is empty
doskey /history | findstr /v /x "%0" >1.txt
for /f "delims=" %%i in (1.txt) do set lastCMD=%%i
%lastCMD% >1.txt
Floor 5 Posted 2007-04-25 23:05 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
Looks like the scroll bar and the jump part were also “some omitted” — whoever can guess it is really
Floor 6 Posted 2007-04-26 02:43 ·  中国 福建 福州 电信
初级用户
Credits 57
Posts 23
Joined 2007-04-23 05:19
19-year member
UID 86157
Gender Male
Status Offline
What's omitted doesn't matter```
Floor 7 Posted 2007-04-26 04:02 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
You mean the scroll bar on the right side of the window, right? Just remove the latter part and it'll be OK
MODE con: COLS=55 LINES=30
Floor 8 Posted 2007-04-26 04:44 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
The poster above got it right, I didn't look carefully, ^_^
Floor 9 Posted 2007-04-26 12:16 ·  中国 湖南 张家界 电信
初级用户
Credits 69
Posts 37
Joined 2007-01-01 14:22
19-year member
UID 75195
Gender Male
Status Offline
I can't understand it, can some expert explain it?
Floor 10 Posted 2007-04-26 16:08 ·  中国 重庆 长寿区 电信
初级用户
Credits 101
Posts 47
Joined 2007-04-18 16:05
19-year member
UID 85634
Gender Male
Status Offline
The code isn't even complete — if you understood it then you It's roughly a thing for checking processes

[ Last edited by chkau on 2007-4-26 at 03:13 AM ]
Floor 11 Posted 2007-04-26 17:13 ·  中国 广东 广州 联通
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
Heh, it's very simple code, even I can understand it。。

And you were actually worried LXMXN wouldn't understand it。。 speechless
知,不觉多。不知,乃求知
Floor 12 Posted 2007-04-27 02:11 ·  中国 福建 福州 电信
初级用户
Credits 57
Posts 23
Joined 2007-04-23 05:19
19-year member
UID 86157
Gender Male
Status Offline
You mean the scroll bar on the right side of the window, right? Just remove the latter part and it'll be OK
MODE con: COLS=55 LINES=30

If I remove this thing````
```then the main interface won't look good`

If I don't remove it, then in
@echo off
color f9
MODE con: COLS=80
title enix's Process Analysis
set space=
how should I change it here
Floor 13 Posted 2007-04-27 02:13 ·  中国 福建 福州 电信
初级用户
Credits 57
Posts 23
Joined 2007-04-23 05:19
19-year member
UID 86157
Gender Male
Status Offline
And I tried removing it too, and it still doesn't work!!!
Floor 14 Posted 2007-04-27 04:22 ·  中国 福建 福州 电信
初级用户
Credits 57
Posts 23
Joined 2007-04-23 05:19
19-year member
UID 86157
Gender Male
Status Offline
I also want to ask, how can I make line breaks happen in output text???
I used
XXXXXX$XXXXXXX>1.txt and it failed
Floor 15 Posted 2007-04-27 07:13 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
In the same CMD window, as long as MODE con: LINES=30 appears even once, the scroll bar on the right side of the window will disappear. No matter how you change it, it won't come back. You can only close it and start over, there's no way around it
Forum Jump: