中国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-09-26 13:45
47,813 topics / 349,918 posts / today 0 new / 48,275 members
DOS批处理 & 脚本技术(批处理室) » [Original + Discussion] Smartly Obtain 72-Hour Weather Forecast
Printable Version  2,977 / 25
Floor1 dosmania Posted 2007-09-21 15:53
初级用户 Posts 54 Credits 172
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



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



[ Last edited by dosmania on 2007-9-23 at 07:38 PM ]
Floor2 moochat Posted 2007-09-21 17:29
新手上路 Posts 5 Credits 11
Wow, come down and learn something
Floor3 scriptor Posted 2007-09-22 01:09
银牌会员 Posts 555 Credits 1,187
Great! Give it a thumbs up!
Floor4 lxmxn Posted 2007-09-22 20:57
版主 Posts 4,938 Credits 11,386
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.
Floor5 dosmania Posted 2007-09-23 00:36
初级用户 Posts 54 Credits 172
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.
Floor6 HAT Posted 2007-09-23 12:42
版主 Posts 5,017 Credits 9,023
Floor7 anhui8080 Posted 2007-09-23 14:36
新手上路 Posts 10 Credits 18
Floor8 dosmania Posted 2007-09-23 17:03
初级用户 Posts 54 Credits 172
Can the 7th floor describe how exactly the operation failed?
Floor9 175891641 Posted 2007-09-23 18:38
初级用户 Posts 30 Credits 82
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?
Floor10 dosmania Posted 2007-09-23 19:41
初级用户 Posts 54 Credits 172
Re: Post 9:
As long as your internet speed is sufficient and you can connect to the following websites normally, my batch script can run normally.

http://www.ip138.com
http://weather.news.qq.com
http://kumho.lin.googlepages.com
Floor11 qcqtye Posted 2007-10-01 23:52
初级用户 Posts 14 Credits 26
What a talented expert! I know nothing about BAT... So difficult!!
Floor12 Noname Posted 2007-10-06 13:07
新手上路 Posts 9 Credits 18
Wow!
Admire the creativity of the original poster...
Floor13 fastslz Posted 2007-12-06 08:31
铂金会员 Posts 2,315 Credits 5,493 From 上海
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
Floor14 pxcok Posted 2007-12-06 13:22
新手上路 Posts 6 Credits 12
LZ. It didn't run successfully. The same error as the upstairs...
Floor15 vcstone Posted 2007-12-07 14:18
初级用户 Posts 39 Credits 98
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023