|
dosmania
初级用户
 
积分 172
发帖 54
注册 2007-1-2
状态 离线
|
 『楼 主』:
[原创+讨论]智能获取72小时天气预报
使用 LLM 解释/回答一下
功能:根据IP判断地理位置,然后获取相应地区72小时内的天气预报。
其中有一个很明显的不足之处:
控制变量输出的时候,排版真不好搞``虽然效果很好,但有点勉强,望牛人指点给出更好的方案或者算法。
关键效果截图:
也可从这里下载: http://kumho.lin.googlepages.com/WeatherCapturer.bat
@echo off
if "%1"=="" goto :FullScreen
::还原显示模式
REG ADD HKEY_CURRENT_USER\Console /v FullScreen /t REG_DWORD /d %1 /f>nul
cls
title 智能获取72小时天气预报 --- 腾讯版 Code By Kumho Lin
color 0b
setlocal EnableDelayedExpansion
set "a=FileName: WeatherCapturer.exe"
set "b=FileVersion: 1.0.0.1"
set "c=Function: Get the weather information in 72 hours according to your location"
set "d=Author: Kumho Lin"
set "e=QQ: 240460440"
set "f=E-Mail: kumho.lin@gmail.com"
set "g=HomePage: http://kumho.lin.googlepages.com"
set "h=Are you sure you wanna run this batch program right now ?"
for %%i in (a b c d e f g h) do (
set/p=<nul
for /l %%a in (0,1,100) do (
if not "!%%i:~%%a,1!"=="" (
if "%%a"=="100" echo.&echo;
set/p=!%%i:~%%a,1!<nul
for /l %%p in (1,1,200) do ver>nul
)
)
echo.
)
set /p choice=
if /i "%choice%"=="y" (goto Begin) else goto Out
:Out
exit
:Begin
cls
ping -n 2 127.1 >nul 2>nul
:: →→→→→→→→→→→→→ Loading The Program ←←←←←←←←←←
(set,=Loading the program, please wait a minute&for /l %%c In (0,1,42)do @call set/p=%%,:~%%c,1%%<nul)&set,=&ping -n 2 127.1>nul&set/p="."<nul&ping -n 2 127.1>nul&set/p="."<nul&ping -n 2 127.1>nul&set/P="."<nul&ping -n 3 127.1>nul
cls
set num=20
set a==
set n=1
for /l %%i in (1,1,80) do (
cls
set /a num+=1
echo !num!%%
echo !a!
set a=!a!=
set /a n+=1
for /l %%j in (1,1,150) do ver>nul
)
ping -n 1 127.1 >nul 2>nul
echo Loading Complete
ping -n 2 127.1 >nul 2>nul
endlocal
cls
:: →→→→→→→→→→→→→ Loading The Program ←←←←←←←←←←
:: ************************** 判断是否联网 *****************************
setlocal EnableDelayedExpansion
set a=The program is detecting your system, please wait a minute...
for %%i in (a) do (
set/p=<nul
for /l %%a in (0,1,100) do (
if not "!%%i:~%%a,1!"=="" (
if %%a==100 echo.&echo;
set/p=!%%i:~%%a,1!<nul
for /l %%i in (1,1,100) do ver>nul
)
)
echo.
)
endlocal
ping -n 2 127.1>nul 2>nul
cls
ping -n 2 www.ip138.com >nul 2>nul
if %errorlevel% equ 0 (goto ready) else goto problem
:problem
setlocal DisableDelayedExpansion
set "A= Your computer is not connecting to the Internet !!!"
set "B="
for /l %%j in (1,1,10) do (
set/p=%A%<nul
set/p=%B%<nul
for /l %%i in (1,1,500) do ver>nul
set/p= <nul
for /l %%i in (1,1,500) do ver>nul
set/p=%B%<nul
ping -n 1 127.1 >nul 2>nul
)
endlocal
MSG * /time:3 ***** 您必须连接到互联网才能使用该功能 *****
goto quit
:ready
echo The batch program is connecting to the Internet, please wait a few seconds...
ping -n 4 127.1>nul 2>nul
cls
:: ==================== 获取IP、地理位置及ISP脚本开始 ===================
echo Set oDOM = WScript.GetObject(WScript.Arguments(0))>%TEMP%\Text.vbs
echo Do Until oDOM.readyState = "complete">>%TEMP%\Text.vbs
echo WScript.sleep 200>>%TEMP%\Text.vbs
echo Loop>>%TEMP%\Text.vbs
echo WScript.echo oDOM.documentElement.outerText>>%TEMP%\Text.vbs
echo Set oDOM=nothing>>%TEMP%\Text.vbs
cscript //NoLogo /E:vbscript %TEMP%\Text.vbs http://www.ip138.com | find /i "您的IP地址是" 2>nul>%TEMP%\location.txt
for /f "tokens=2 delims=" %%i in (%TEMP%\location.txt) do set true_ip=%%i
for /f "tokens=2,3 delims= " %%k in (%TEMP%\location.txt) do (
set your_location=%%k
set true_isp=%%l
)
echo %your_location:~3,-1%>%TEMP%\your_location.txt
for /f "tokens=1,2 delims=省" %%p in (%TEMP%\your_location.txt) do (
set true_province=%%p
set true_city=%%q
)
:: ==================== 获取IP、地理位置及ISP脚本结束 ===================
:: ************************* 获取气温信息脚本开始 ***********************
cscript //nologo /e:vbscript %TEMP%\Text.vbs http://kumho.lin.googlepages.com/city.txt|find /v /i "javascript" 2>nul>%TEMP%\cityInfo.txt
for /f "tokens=1 delims=/" %%i in ('find /i "%true_city%" %TEMP%\cityInfo.txt') do set cityCode=%%i
set "cityAddress=http://weather.news.qq.com/inc/07_dc%cityCode%.htm"
echo Set oDOM = WScript.GetObject(WScript.Arguments(0))>%TEMP%\HTML.vbs
echo Do Until oDOM.readyState = "complete">>%TEMP%\HTML.vbs
echo WScript.sleep 200>>%TEMP%\HTML.vbs
echo Loop>>%TEMP%\HTML.vbs
echo WScript.echo oDOM.documentElement.outerHTML>>%TEMP%\HTML.vbs
echo Set oDOM=nothing>>%TEMP%\HTML.vbs
cscript //nologo /e:vbscript %TEMP%\HTML.vbs %cityAddress% 2>nul>%TEMP%\source.txt
:: ******** 获取气温信息代码 ********
Setlocal EnableDelayedExpansion
set a=1
for /f "tokens=4 delims= " %%i in ('type %TEMP%\source.txt^|find /i "#eef3f8"') do (
set var=%%i
set string=!var:~10!
set num=!string:^<BR^>=#!
for /f "tokens=1,2 delims=#" %%a in ("!num!") do (
set tq!a!=%%a
set wd!a!=%%b
)
set /a a+=1
)
endlocal
:: ******** 获取日期信息代码 ********
Setlocal EnableDelayedExpansion
set b=1
for /f "tokens=4 delims=, " %%i in ('type %TEMP%\source.txt^|find /i "#eeeeee"') do (
set time1=%%i
set time2=!time1:^>=#!
set time3=!time2:^<=#!
for /f "tokens=2 delims=#" %%a in ("!time3!") do set rq!b!=%%a
set /a b+=1
)
endlocal
:: ************************* 获取气温信息脚本结束 ***********************
:: /*-*-*-*-*-*-*-*-*-*-* 获取操作系统版本信息开始 *-*-*-*-*-*-*-*-*-*-*/
Systeminfo 2>nul >%TEMP%\systeminfo.txt
type %TEMP%\systeminfo.txt | Find /I /V "BIOS 版本:" >%TEMP%\eol.txt
For /F "tokens=3*" %%I in ('type %TEMP%\systeminfo.txt ^| Find /I "OS 名称:"') Do Set os_name=%%I %%J
For /F "tokens=3,4,5,6 delims= " %%i in ('type %TEMP%\eol.txt ^| Find /I "OS 版本:"') Do Set os_ver=%%i %%j %%k %%l
Set os_name_ver=%os_name% %os_ver%
:: /*-*-*-*-*-*-*-*-*-*-* 获取操作系统版本信息结束 *-*-*-*-*-*-*-*-*-*-*/
:: ------------------------- 变量显示排版代码开始 -----------------------
:: --------变量注释开始--------
:: OS Version: %os_name_ver%
:: IP Address: %true_ip%
:: 省份: %true_province%
:: 城市: %true_city%
:: ISP: %true_isp%
:: 日期: %rq1% %rq2% %rq3%
:: 温度: %wd1% %wd2% %wd3%
:: 天气: %tq1% %tq2% %tq3%
:: --------变量注释结束--------
setlocal EnableDelayedExpansion
set a=┌───────────────────────────────────┐
set b=│ %os_name_ver% │
set c=├───────────────────────────────────┤
set d=│ %true_province%%true_city%地区72小时天气预报 │
set e=├───────────┬───────────┬───────────┤
set f=│ %rq1% │ %rq2% │ %rq3% │
set g=├───────────┼───────────┼───────────┤
set h=│ %wd1% │ %wd1% │ %wd1% │
set i=├───────────┼───────────┼───────────┤
set j=│ %tq1% │ %tq2% │ %tq3% │
set k=└───────────┴───────────┴───────────┘
for %%i in (a b c d e f g h i j k) do (
set/p= <nul
for /l %%a in (0,1,100) do (
if not "!%%i:~%%a,1!"=="" (
if %%a==100 echo.&echo;
set/p=!%%i:~%%a,1!<nul
for /l %%i in (1,1,70) do ver>nul
)
)
echo.
)
endlocal
echo.
echo.
del %TEMP%\location.txt %TEMP%\cityInfo.txt %TEMP%\your_location.txt %TEMP%\source.txt %TEMP%\systeminfo.txt %TEMP%\eol.txt %TEMP%\Text.vbs %TEMP%\HTML.vbs >nul 2>nul
ping -n 6 >nul 2>nul
:: ━━━━━━━━━━━━━━━ 尾部声明开始 ━━━━━━━━━━━━━
setlocal DisableDelayedExpansion
set "P= 各段代码的功能均有注释,不足之处,请多多指教 !!!"
set "K="
for /l %%j in (1,1,10) do (
set/p=%P%<nul
set/p=%K%<nul
for /l %%i in (1,1,250) do ver>nul
set/p= <nul
for /l %%i in (1,1,300) do ver>nul
set/p=%K%<nul
ping -n 1 127.1 >nul 2>nul
)
echo.
(Set,= http://kumho.lin.googlepages.com&For,/L,%%g,in,(0,1,85)Do,@Call,Set/P=%%,:~%%g,1%%<Nul&Ping/n 1 127.1>Nul)&Set,=&Ping -n 4 127.1>Nul
:: ━━━━━━━━━━━━━━━ 尾部声明结束 ━━━━━━━━━━━━━
:: ------------------------- 变量显示排版代码结束 -----------------------
:quit
exit
:FullScreen
::查询显示模式
Set ShowMode=0
for /f "delims=" %%i in ('REG QUERY HKEY_CURRENT_USER\Console /v "FullScreen"') do set ShowMode=%%i
Set ShowMode=%ShowMode:~-1%
::设置显示模式为全屏
REG ADD HKEY_CURRENT_USER\Console /v FullScreen /t REG_DWORD /d 1 /f>nul
::全屏启动当前脚本
start "" %0 %ShowMode%
--------------------------------------------------------------------------------------------------
更新:
1. 在slore的帮助下实现了全屏幕效果
缺陷:
修改注册表再传参数调用批处理自身的这种方法用在我这个批处理上,似乎不那么顺利,有些变量获取不到,绝非网速慢的原因,因为我以默认窗口大小运行该批处理,然后按ALT+ENTER,也是全屏幕,能正常获取到相应的变量,这些变量是需要联网才能获取到的。
运行我更新后的代码效果如下:
┌───────────────────────────────────┐
│ Microsoft Windows XP Professional 5.1.2600 Service Pack 2 │
├───────────────────────────────────┤
│ 广东广州地区72小时天气预报 │
├───────────┬───────────┬───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
└───────────┴───────────┴───────────┘
Last edited by dosmania on 2007-9-23 at 07:38 PM ]
Function: Determine the geographical location based on the IP, then obtain the 72-hour weather forecast for the corresponding area.
One very obvious shortcoming is:
It's really hard to handle the layout when controlling the variable output``Although the effect is good, it's a bit forced. I hope experts can give better solutions or algorithms.
Key effect screenshots:
It can also be downloaded from here: http://kumho.lin.googlepages.com/WeatherCapturer.bat
@echo off
if "%1"=="" goto :FullScreen
::Restore display mode
REG ADD HKEY_CURRENT_USER\Console /v FullScreen /t REG_DWORD /d %1 /f>nul
cls
title Intelligent Acquisition of 72-Hour Weather Forecast --- Tencent Version Code By Kumho Lin
color 0b
setlocal EnableDelayedExpansion
set "a=FileName: WeatherCapturer.exe"
set "b=FileVersion: 1.0.0.1"
set "c=Function: Get the weather information in 72 hours according to your location"
set "d=Author: Kumho Lin"
set "e=QQ: 240460440"
set "f=E-Mail: kumho.lin@gmail.com"
set "g=HomePage: http://kumho.lin.googlepages.com"
set "h=Are you sure you wanna run this batch program right now ?"
for %%i in (a b c d e f g h) do (
set/p=<nul
for /l %%a in (0,1,100) do (
if not "!%%i:~%%a,1!"=="" (
if "%%a"=="100" echo.&echo;
set/p=!%%i:~%%a,1!<nul
for /l %%p in (1,1,200) do ver>nul
)
)
echo.
)
set /p choice=
if /i "%choice%"=="y" (goto Begin) else goto Out
:Out
exit
:Begin
cls
ping -n 2 127.1 >nul 2>nul
:: →→→→→→→→→→→→→ Loading The Program ←←←←←←←←←←
(set,=Loading the program, please wait a minute&for /l %%c In (0,1,42)do @call set/p=%%,:~%%c,1%%<nul)&set,=&ping -n 2 127.1>nul&set/p="."<nul&ping -n 2 127.1>nul&set/p="."<nul&ping -n 2 127.1>nul&set/P="."<nul&ping -n 3 127.1>nul
cls
set num=20
set a==
set n=1
for /l %%i in (1,1,80) do (
cls
set /a num+=1
echo !num!%%
echo !a!
set a=!a!=
set /a n+=1
for /l %%j in (1,1,150) do ver>nul
)
ping -n 1 127.1 >nul 2>nul
echo Loading Complete
ping -n 2 127.1 >nul 2>nul
endlocal
cls
:: →→→→→→→→→→→→→ Loading The Program ←←←←←←←←←←
:: ************************** Determine whether connected to the Internet *****************************
setlocal EnableDelayedExpansion
set a=The program is detecting your system, please wait a minute...
for %%i in (a) do (
set/p=<nul
for /l %%a in (0,1,100) do (
if not "!%%i:~%%a,1!"=="" (
if %%a==100 echo.&echo;
set/p=!%%i:~%%a,1!<nul
for /l %%i in (1,1,100) do ver>nul
)
)
echo.
)
endlocal
ping -n 2 127.1>nul 2>nul
cls
ping -n 2 www.ip138.com >nul 2>nul
if %errorlevel% equ 0 (goto ready) else goto problem
:problem
setlocal DisableDelayedExpansion
set "A= Your computer is not connecting to the Internet !!!"
set "B="
for /l %%j in (1,1,10) do (
set/p=%A%<nul
set/p=%B%<nul
for /l %%i in (1,1,500) do ver>nul
set/p= <nul
for /l %%i in (1,1,500) do ver>nul
set/p=%B%<nul
ping -n 1 127.1 >nul 2>nul
)
endlocal
MSG * /time:3 ***** You must be connected to the Internet to use this function *****
goto quit
:ready
echo The batch program is connecting to the Internet, please wait a few seconds...
ping -n 4 127.1>nul 2>nul
cls
:: ==================== Start of script to obtain IP, geographical location and ISP ===================
echo Set oDOM = WScript.GetObject(WScript.Arguments(0))>%TEMP%\Text.vbs
echo Do Until oDOM.readyState = "complete">>%TEMP%\Text.vbs
echo WScript.sleep 200>>%TEMP%\Text.vbs
echo Loop>>%TEMP%\Text.vbs
echo WScript.echo oDOM.documentElement.outerText>>%TEMP%\Text.vbs
echo Set oDOM=nothing>>%TEMP%\Text.vbs
cscript //NoLogo /E:vbscript %TEMP%\Text.vbs http://www.ip138.com | find /i "Your IP address is" 2>nul>%TEMP%\location.txt
for /f "tokens=2 delims=" %%i in (%TEMP%\location.txt) do set true_ip=%%i
for /f "tokens=2,3 delims= " %%k in (%TEMP%\location.txt) do (
set your_location=%%k
set true_isp=%%l
)
echo %your_location:~3,-1%>%TEMP%\your_location.txt
for /f "tokens=1,2 delims=省" %%p in (%TEMP%\your_location.txt) do (
set true_province=%%p
set true_city=%%q
)
:: ==================== End of script to obtain IP, geographical location and ISP ===================
:: ************************* Start of script to obtain temperature information ***********************
cscript //nologo /e:vbscript %TEMP%\Text.vbs http://kumho.lin.googlepages.com/city.txt|find /v /i "javascript" 2>nul>%TEMP%\cityInfo.txt
for /f "tokens=1 delims=/" %%i in ('find /i "%true_city%" %TEMP%\cityInfo.txt') do set cityCode=%%i
set "cityAddress=http://weather.news.qq.com/inc/07_dc%cityCode%.htm"
echo Set oDOM = WScript.GetObject(WScript.Arguments(0))>%TEMP%\HTML.vbs
echo Do Until oDOM.readyState = "complete">>%TEMP%\HTML.vbs
echo WScript.sleep 200>>%TEMP%\HTML.vbs
echo Loop>>%TEMP%\HTML.vbs
echo WScript.echo oDOM.documentElement.outerHTML>>%TEMP%\HTML.vbs
echo Set oDOM=nothing>>%TEMP%\HTML.vbs
cscript //nologo /e:vbscript %TEMP%\HTML.vbs %cityAddress% 2>nul>%TEMP%\source.txt
:: ******** Code to obtain temperature information ********
Setlocal EnableDelayedExpansion
set a=1
for /f "tokens=4 delims= " %%i in ('type %TEMP%\source.txt^|find /i "#eef3f8"') do (
set var=%%i
set string=!var:~10!
set num=!string:^<BR^>=#!
for /f "tokens=1,2 delims=#" %%a in ("!num!") do (
set tq!a!=%%a
set wd!a!=%%b
)
set /a a+=1
)
endlocal
:: ******** Code to obtain date information ********
Setlocal EnableDelayedExpansion
set b=1
for /f "tokens=4 delims=, " %%i in ('type %TEMP%\source.txt^|find /i "#eeeeee"') do (
set time1=%%i
set time2=!time1:^>=#!
set time3=!time2:^<=#!
for /f "tokens=2 delims=#" %%a in ("!time3!") do set rq!b!=%%a
set /a b+=1
)
endlocal
:: ************************* End of script to obtain temperature information ***********************
:: /*-*-*-*-*-*-*-*-*-*-* Start of script to obtain operating system version information *-*-*-*-*-*-*-*-*-*-*/
Systeminfo 2>nul >%TEMP%\systeminfo.txt
type %TEMP%\systeminfo.txt | Find /I /V "BIOS 版本:" >%TEMP%\eol.txt
For /F "tokens=3*" %%I in ('type %TEMP%\systeminfo.txt ^| Find /I "OS 名称:"') Do Set os_name=%%I %%J
For /F "tokens=3,4,5,6 delims= " %%i in ('type %TEMP%\eol.txt ^| Find /I "OS 版本:"') Do Set os_ver=%%i %%j %%k %%l
Set os_name_ver=%os_name% %os_ver%
:: /*-*-*-*-*-*-*-*-*-*-* End of script to obtain operating system version information *-*-*-*-*-*-*-*-*-*-*/
:: ------------------------- Start of variable display layout code -----------------------
:: -------- Start of variable comments --------
:: OS Version: %os_name_ver%
:: IP Address: %true_ip%
:: Province: %true_province%
:: City: %true_city%
:: ISP: %true_isp%
:: Date: %rq1% %rq2% %rq3%
:: Temperature: %wd1% %wd2% %wd3%
:: Weather: %tq1% %tq2% %tq3%
:: -------- End of variable comments --------
setlocal EnableDelayedExpansion
set a=┌───────────────────────────────────┐
set b=│ %os_name_ver% │
set c=├───────────────────────────────────┤
set d=│ %true_province%%true_city% Area 72-Hour Weather Forecast │
set e=├───────────┬───────────┬───────────┤
set f=│ %rq1% │ %rq2% │ %rq3% │
set g=├───────────┼───────────┼───────────┤
set h=│ %wd1% │ %wd1% │ %wd1% │
set i=├───────────┼───────────┼───────────┤
set j=│ %tq1% │ %tq2% │ %tq3% │
set k=└───────────┴───────────┴───────────┘
for %%i in (a b c d e f g h i j k) do (
set/p= <nul
for /l %%a in (0,1,100) do (
if not "!%%i:~%%a,1!"=="" (
if %%a==100 echo.&echo;
set/p=!%%i:~%%a,1!<nul
for /l %%i in (1,1,70) do ver>nul
)
)
echo.
)
endlocal
echo.
echo.
del %TEMP%\location.txt %TEMP%\cityInfo.txt %TEMP%\your_location.txt %TEMP%\source.txt %TEMP%\systeminfo.txt %TEMP%\eol.txt %TEMP%\Text.vbs %TEMP%\HTML.vbs >nul 2>nul
ping -n 6 >nul 2>nul
:: ━━━━━━━━━━━━━━━ Start of tail statement ━━━━━━━━━━━━━
setlocal DisableDelayedExpansion
set "P= Each segment of code has comments. For any shortcomings, please give more advice !!!"
set "K="
for /l %%j in (1,1,10) do (
set/p=%P%<nul
set/p=%K%<nul
for /l %%i in (1,1,250) do ver>nul
set/p= <nul
for /l %%i in (1,1,300) do ver>nul
set/p=%K%<nul
ping -n 1 127.1 >nul 2>nul
)
echo.
(Set,= http://kumho.lin.googlepages.com&For,/L,%%g,in,(0,1,85)Do,@Call,Set/P=%%,:~%%g,1%%<Nul&Ping/n 1 127.1>Nul)&Set,=&Ping -n 4 127.1>Nul
:: ━━━━━━━━━━━━━━━ End of tail statement ━━━━━━━━━━━━━
:: ------------------------- End of variable display layout code -----------------------
:quit
exit
:FullScreen
::Query display mode
Set ShowMode=0
for /f "delims=" %%i in ('REG QUERY HKEY_CURRENT_USER\Console /v "FullScreen"') do set ShowMode=%%i
Set ShowMode=%ShowMode:~-1%
::Set display mode to full screen
REG ADD HKEY_CURRENT_USER\Console /v FullScreen /t REG_DWORD /d 1 /f>nul
::Start current script in full screen
start "" %0 %ShowMode%
--------------------------------------------------------------------------------------------------
Update:
1. With the help of slore, the full-screen effect is realized
Defect:
The method of modifying the registry and then passing parameters to call the batch script itself seems not so smooth for my batch script. Some variables cannot be obtained. It is definitely not because of slow network speed, because I run the batch script in the default window size, and then press ALT+ENTER, which is also full screen, and can normally obtain the corresponding variables. These variables need to be obtained online.
The effect of running my updated code is as follows:
┌───────────────────────────────────┐
│ Microsoft Windows XP Professional 5.1.2600 Service Pack 2 │
├───────────────────────────────────┤
│ Guangdong Guangzhou Area 72-Hour Weather Forecast │
├───────────┬───────────┬───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
└───────────┴───────────┴───────────┘
Last edited by dosmania on 2007-9-23 at 07:38 PM ]
此帖被 +39 点积分 点击查看详情 评分人:【 knoppix7 】 | 分数: +4 | 时间:2007-9-21 18:07 | 评分人:【 scriptor 】 | 分数: +2 | 时间:2007-9-22 01:10 | 评分人:【 lxmxn 】 | 分数: +12 | 时间:2007-9-22 20:58 | 评分人:【 bjsh 】 | 分数: +12 | 时间:2007-9-22 23:50 | 评分人:【 HAT 】 | 分数: +8 | 时间:2007-9-23 12:42 | 评分人:【 xiaohacker 】 | 分数: +1 | 时间:2007-12-10 20:16 |
|
|
|
2007-9-21 15:53 |
|
|
moochat
新手上路

积分 11
发帖 5
注册 2007-6-8
状态 离线
|
|
2007-9-21 17:29 |
|
|
scriptor
银牌会员
    
积分 1187
发帖 555
注册 2006-12-21
状态 离线
|
|
2007-9-22 01:09 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
很不错的程序,赞一个先。
至于最后的表格显示,的确有点小问题,可以利用变量截取加上标签调用来实现。
标签的作用是将要显示的字符导入一个临时文件temp中,然后利用for的%~z取得文件大小,根据这个大小来决定截取字符的长度。
以前我写过一个类似的表格输出,但是搜索半天无果,这里就提供一个思路了。
It's a very good program, let's give a thumbs up first.
As for the final table display, there are indeed some small issues. It can be achieved by using variable interception plus tag calls. The function of the tag is to import the characters to be displayed into a temporary file temp, and then use %~z of for to get the file size, and determine the length of the intercepted characters according to this size.
I wrote a similar table output before, but after searching for a long time without result, here I just provide an idea.
|
|
2007-9-22 20:57 |
|
|
dosmania
初级用户
 
积分 172
发帖 54
注册 2007-1-2
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
以前貌似看过好象是namejm版主发过一个关于变量排版的贴子,我也忘了在哪里了。
多谢版主意见,我尽力修补那个变量显示问题。
I seem to have seen before that the moderator named namejm posted a thread about variable formatting, and I forgot where it was.
Thanks to the moderator's advice, I will try my best to fix that variable display issue.
|
|
2007-9-23 00:36 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
|
2007-9-23 12:42 |
|
|
anhui8080
新手上路

积分 18
发帖 10
注册 2006-5-14
状态 离线
|
|
2007-9-23 14:36 |
|
|
dosmania
初级用户
 
积分 172
发帖 54
注册 2007-1-2
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
7 楼能否描述 一下怎么个运行失败法``
Can the 7th floor describe how exactly the operation failed?
|
|
2007-9-23 17:03 |
|
|
175891641
初级用户
 
积分 82
发帖 30
注册 2007-7-3
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
晕死
显示不能连接互联网啊
我可以发帖子啊
算不算已经连接互联网了啊。
Dizzy
It shows that I can't connect to the Internet.
I can post a thread. Does that mean I have already connected to the Internet?
|
|
2007-9-23 18:38 |
|
|
dosmania
初级用户
 
积分 172
发帖 54
注册 2007-1-2
状态 离线
|
|
2007-9-23 19:41 |
|
|
qcqtye
初级用户
 
积分 26
发帖 14
注册 2006-1-14
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
好厉害的达人啊..我对BAT一窍不通../苦!!
What a talented expert! I know nothing about BAT... So difficult!!
|
|
2007-10-1 23:52 |
|
|
Noname
新手上路

积分 18
发帖 9
注册 2007-7-25
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
屌!!!
佩服LZ的创意。。。
Wow!
Admire the creativity of the original poster...
|
|
2007-10-6 13:07 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
楼主整个代码缺少"",用好""代码就更稳定
~3,-1TEMP\your_location.txt
系统找不到文件 E:\TEMP\XP-TEMP\TEMP\your_location.txt。
┌───────────────────────────────────┐
│ Microsoft Windows XP Professional 5.1.2600 Service Pack 2 │
├───────────────────────────────────┤
│ 地区72小时天气预报 │
├───────────┬───────────┬───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
└───────────┴───────────┴───────────┘
http://kumho.lin.googlepages.com
The owner's entire code is missing "", using "" will make the code more stable
~3,-1TEMP\your_location.txt
The system cannot find the file E:\TEMP\XP-TEMP\TEMP\your_location.txt.
┌───────────────────────────────────┐
│ Microsoft Windows XP Professional 5.1.2600 Service Pack 2 │
├───────────────────────────────────┤
│ 地区72小时天气预报 │
├───────────┬───────────┬───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
├───────────┼───────────┼───────────┤
│ │ │ │
└───────────┴───────────┴───────────┘
http://kumho.lin.googlepages.com
|

第一高手 第二高手
我的小站
 |
|
2007-12-6 08:31 |
|
|
pxcok
新手上路

积分 12
发帖 6
注册 2007-1-25
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
楼主。运行不成功呀。同楼上的错误。。。
LZ. It didn't run successfully. The same error as the upstairs...
|

西安阳光:http://www.sun029.com |
|
2007-12-6 13:22 |
|
|
vcstone
初级用户
 
积分 98
发帖 39
注册 2007-3-16
状态 离线
|
|
2007-12-7 14:18 |
|
|