中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-04 11:10
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » Help with the scroll bar issue!!!!
Printable Version  2,229 / 15
Floor1 enixchen Posted 2007-04-25 12:59
初级用户 Posts 23 Credits 57
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```
Floor2 lxmxn Posted 2007-04-25 13:22
版主 Posts 4,938 Credits 11,386
Show your code first?
Floor3 enixchen Posted 2007-04-25 22:53
初级用户 Posts 23 Credits 57
: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
Floor4 enixchen Posted 2007-04-25 22:57
初级用户 Posts 23 Credits 57
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
Floor5 zh159 Posted 2007-04-25 23:05
金牌会员 Posts 1,467 Credits 3,687
Looks like the scroll bar and the jump part were also “some omitted” — whoever can guess it is really
Floor6 enixchen Posted 2007-04-26 02:43
初级用户 Posts 23 Credits 57
What's omitted doesn't matter```
Floor7 zh159 Posted 2007-04-26 04:02
金牌会员 Posts 1,467 Credits 3,687
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
Floor8 lxmxn Posted 2007-04-26 04:44
版主 Posts 4,938 Credits 11,386
The poster above got it right, I didn't look carefully, ^_^
Floor9 fengjing001 Posted 2007-04-26 12:16
初级用户 Posts 37 Credits 69
I can't understand it, can some expert explain it?
Floor10 chkau Posted 2007-04-26 16:08
初级用户 Posts 47 Credits 101
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 ]
Floor11 flyinspace Posted 2007-04-26 17:13
银牌会员 Posts 517 Credits 1,206
Heh, it's very simple code, even I can understand it。。

And you were actually worried LXMXN wouldn't understand it。。 speechless
Floor12 enixchen Posted 2007-04-27 02:11
初级用户 Posts 23 Credits 57
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
Floor13 enixchen Posted 2007-04-27 02:13
初级用户 Posts 23 Credits 57
And I tried removing it too, and it still doesn't work!!!
Floor14 enixchen Posted 2007-04-27 04:22
初级用户 Posts 23 Credits 57
I also want to ask, how can I make line breaks happen in output text???
I used
XXXXXX$XXXXXXX>1.txt and it failed
Floor15 zh159 Posted 2007-04-27 07:13
金牌会员 Posts 1,467 Credits 3,687
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
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023