- UID
- 185364
- 主题
- 注册时间
- 2010-5-15
- 在线时间
- 小时
- 最后登录
- 1970-1-1
签到天数: 118 天 [LV.6]常住居民II
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?点击注册
x
先声明一下,此文章转载自论坛Pyrogas的博客。
一个非常详细的国内天气讲解,转载来跟大家分享一下,有兴趣的朋友不妨看看
在此也谢谢Pyrogas!辛苦了!
以下正文:
很久以前,从网上找了一个Illustro主题的天气皮肤。
可能是外国人做的,用的是外国的天气网站,所以很多国内的城市都没有代码,自然也不能显示天气。所以论坛上有人要我做一个国内的,好吧。
以前我一直搞不明白Rainmeter怎么调用天气图标,我在代码里面找了很久也没有找到类似的语句,好吧,小白了。后来发现根本不是Rainmeter调用,而是RSS天气网站的的时候,网站已经写好了的。(害我白费了很多脑细胞啊!)
但是国内的中国天气网的天气数据十分的蛋疼,外国网站是最高温度,最低温度分开的,而国内网站是**℃~**℃。
例如晚上RSS显示的是"temp1":"16℃~20℃","temp2":"13℃~17℃","temp3":"12℃~18℃"
但是到了第二天白天,RSS显示"temp1":"20℃~13℃","temp2":"17℃~12℃","temp3":”18℃~14℃"
Temp后面的数字不是按照固定格式的,而是按照先后顺序出来。所以有两个格式。自然需要重新组合、排列。
并且能自动切换当时的天气状况图标。
经过改进,可以说和原版完全不一样了,添加了至少一倍的代码,并且引用格式也换了,并且改进显示界面。以前只能显示未来三天白天的天气状况,现在能显示未来三天白天和晚上的天气状况。
先说一下,大致思路:
1. 先用Time插件抓取时间,显示小时%H
2. 判断%H和18大小,小于18套用白天格式显示白天数据,大于等于18套用晚上格式,并且显示晚上数据。
本来这里是想抓取网站上的日落时间,然后对比日落时间和计算机时间来进行判断,但是找了半天找不到那句代码。所以可能会添加一个计算公式,但是在这里并没有添加,而是大致取了晚上18点为切换点。
虽然只有简单的2步,但是那些代码看得我眼都花了。
接下来上代码:
===========================================================================- [Rainmeter] -----------无关紧要的一段,主要介绍作者,设置刷新时间、背景模式
- Author=Papa
- e-mail:[email protected]
- Update=1000 -----------刷新时间,1000秒
- BackgroundMode=1
- MouseActionCursor=0
- MiddleMouseDownAction=!RainmeterDeactivateConfig ----------鼠标中键点击关闭皮肤。
- [Metadata] -----------介绍皮肤名字、版本号
- Name=area weather
- Config=area weather white
- Description=shows weather
- Version=2.1.0
- License=PAPA share
- [Variables] -----------总结性的规定一下字体或者别的什么,这里只规定了字体
- WeatherCodeLocation=101210101 -----------城市代码,这是杭州的代码,可换
- WeatherUnit=m
- Font=Century Gothic
- ;=========================================================Hide OR Show
- ;Day -----------规定在白天,即18点以前显示哪些项目,隐藏哪些
- !RainmeterHideMeter 即为隐藏 中间为Show即为显示
- Hide1=[!RainmeterHideMeter MeterTemp1_N][!RainmeterHideMeter MeterTemp2_N][!RainmeterHideMeter MeterTemp2_1_N][!RainmeterHideMeter MeterTemp3_N][!RainmeterHideMeter MeterTemp3_1_N][!RainmeterHideMeter MeterTemp4_N][!RainmeterHideMeter MeterIcon_N][!RainmeterHideMeter MeterIcon1_D][!RainmeterHideMeter MeterIcon2_D][!RainmeterHideMeter MeterIcon3_D][!RainmeterHideMeter MeterIcon1_N][!RainmeterHideMeter MeterIcon2_N][!RainmeterHideMeter MeterIcon3_N]
- Show1=[!RainmeterShowMeter MeterTemp1_D][!RainmeterShowMeter MeterTemp2_D][!RainmeterShowMeter MeterTemp3_D][!RainmeterShowMeter MeterTemp1_1_D][!RainmeterShowMeter MeterTemp2_1_D][!RainmeterShowMeter MeterTemp3_1_D][!RainmeterShowMeter MeterIcon][!RainmeterShowMeter MeterIcon1_1_D][!RainmeterShowMeter MeterIcon2_1_D][!RainmeterShowMeter MeterIcon3_1_D][!RainmeterShowMeter MeterIcon1_1_N][!RainmeterShowMeter MeterIcon2_1_N][!RainmeterShowMeter MeterIcon3_1_N]
- ;Night -----------规定在晚上,即18点以后显示哪些项目,隐藏哪些
- Hide2=[!RainmeterHideMeter MeterTemp1_D][!RainmeterHideMeter MeterTemp2_D][!RainmeterHideMeter MeterTemp3_D][!RainmeterHideMeter MeterTemp1_1_D][!RainmeterHideMeter MeterTemp2_1_D][!RainmeterHideMeter MeterTemp3_1_D][!RainmeterHideMeter MeterIcon][!RainmeterHideMeter MeterIcon1_1_D][!RainmeterHideMeter MeterIcon2_1_D][!RainmeterHideMeter MeterIcon3_1_D][!RainmeterHideMeter MeterIcon1_1_N][!RainmeterHideMeter MeterIcon2_1_N][!RainmeterHideMeter MeterIcon3_1_N]
- Show2=[!RainmeterShowMeter MeterTemp1_N][!RainmeterShowMeter MeterTemp2_N][!RainmeterShowMeter MeterTemp2_1_N][!RainmeterShowMeter MeterTemp3_N][!RainmeterShowMeter MeterTemp3_1_N][!RainmeterShowMeter MeterTemp4_N][!RainmeterShowMeter MeterIcon_N][!RainmeterShowMeter MeterIcon1_D][!RainmeterShowMeter MeterIcon2_D][!RainmeterShowMeter MeterIcon3_D][!RainmeterShowMeter MeterIcon1_N][!RainmeterShowMeter MeterIcon2_N][!RainmeterShowMeter MeterIcon3_N]
- ;=========================================================Weather RSS
- [MeasureWeatherRSS] ----------开始调用RSS插件,后台访问天气网站获取数据
- Measure=Plugin ----------调用=插件
- Plugin=Plugins\WebParser.dll ----------插件地址
- UpdateRate=600 ----------更新时间600秒,这里和上面的不一样,这是访问网站,上面的是刷新
- URL=http://m.weather.com.cn/data//#WeatherCodeLocation#.html
- ----------获取数据的地址,##中间是调用上面代码
- cc=*&unit=#WeatherUnit#&dayf=6
- RegExp="{"weatherinfo":{"city":"(.*)","city_en":"(.*)","date_y":"(.*)","date":"(.*)","week":"(.*)","fchh":"(.*)","cityid":"(.*)","temp1":"(.*)","temp2":"(.*)","temp3":"(.*)","temp4":"(.*)","temp5":"(.*)","temp6":"(.*)","tempF1":"(.*)","tempF2":"(.*)","tempF3":"(.*)","tempF4":"(.*)","tempF5":"(.*)","tempF6":"(.*)","weather1":"(.*)","weather2":"(.*)","weather3":"(.*)","weather4":"(.*)","weather5":"(.*)","weather6":"(.*)","img1":"(.*)","img2":"(.*)","img3":"(.*)","img4":"(.*)","img5":"(.*)","img6":"(.*)","img7":"(.*)","img8":"(.*)","img9":"(.*)","img10":"(.*)","img11":"(.*)","img12":"(.*)","img_single":"(.*)","img_title1":"(.*)","img_title2":"(.*)","img_title3":"(.*)","img_title4":"(.*)","img_title5":"(.*)","img_title6":"(.*)","img_title7":"(.*)","img_title8":"(.*)","img_title9":"(.*)","img_title10":"(.*)","img_title11":"(.*)","img_title12":"(.*)","img_title_single":"(.*)","wind1":"(.*)","wind2":"(.*)","wind3":"(.*)","wind4":"(.*)","wind5":"(.*)","wind6":"(.*)","fx1":"(.*)","fx2":"(.*)","fl1":"(.*)","fl2":"(.*)","fl3":"(.*)","fl4":"(.*)","fl5":"(.*)","fl6":"(.*)","index":"(.*)","index_d":"(.*)","index48":"(.*)","index48_d":"(.*)","index_uv":"(.*)","index48_uv":"(.*)","index_xc":"(.*)","index_tr":"(.*)","index_co":"(.*)","st1":"(.*)","st2":"(.*)","st3":"(.*)","st4":"(.*)","st5":"(.*)","st6":"(.*)","index_cl":"(.*)","index_ls":"(.*)"}}"
- ----------网站上面对数据格式,(.*)意思为变量,也是我们需要的
- StringIndex=1 ----------获取第一个(.*)数据
- IfAboveValue=1 ----------如果大于1,便执行下面命令
- IfAboveAction=!execute [!RainmeterHideMeter MeterIconNA][!RainmeterShowMeter MeterIcon]
- ;=====================================================Now Temp
- [MeasureWeatherNOW] ----------为了显示当前温度,上面的格式中没有当前温度
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- UpdateRate=1800
- Url=http://www.weather.com.cn/data/sk//#WeatherCodeLocation#.html
- RegExp="{"weatherinfo":{"city":"(.*)","cityid":"(.*)","temp":"(.*)","WD":"(.*)","WS":"(.*)","SD":"(.*)","WSE":"(.*)","time":"(.*)","isRadar":"(.*)","Radar":"(.*)"}}"
- StringIndex=1
- ;=======================================================Temp
- ;--------------------------------Day ----------白天温度显示
- [MeasureWeatherTemp1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=8
- Substitute="℃":"","~":"°#CRLF#"
- ----------将第八个(.*)中的数据替换,也就是tamp后面的温度替换
- [MeasureWeatherTemp1_1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=8
- Substitute="℃":"","~":" "
- [MeasureWeatherTemp2_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=9
- Substitute="℃":"","~":"°#CRLF#"
- [MeasureWeatherTemp2_1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=9
- Substitute="℃":"","~":" "
- [MeasureWeatherTemp3_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=10
- Substitute="℃":"","~":"°#CRLF#"
- [MeasureWeatherTemp3_1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=10
- Substitute="℃":"","~":" "
- ;--------------------------------Night
- [MeasureWeatherTemp1_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=8
- Substitute="℃":"","~":" "
- [MeasureWeatherTemp2_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=9
- Substitute="℃":"","~":"°#CRLF##CRLF##CRLF##CRLF##CRLF#"
- [MeasureWeatherTemp2_1_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=9
- Substitute="℃":"","~":" "
- [MeasureWeatherTemp3_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=10
- Substitute="℃":"","~":"°#CRLF##CRLF##CRLF##CRLF##CRLF#"
- [MeasureWeatherTemp3_1_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=10
- Substitute="℃":"","~":" "
- [MeasureWeatherTemp4_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=11
- Substitute="℃":"","~":"°#CRLF##CRLF##CRLF##CRLF##CRLF#"
- ----------这里替换的思路是这样的,原本抓取的数据只是**~**,并不能隔行显示,而且太长容易造成字体重叠。所以将℃替换成为空格,将~替换成强制换行的代码,使其换行,后来考虑调整字体问题,就使用空格和#CRLF#组合方式换行。然后考虑到晚上会显示晚上最低温,觉得没用于是将~替换为一串空格,并且设置右对齐,使前面没用的数据溢出皮肤显示界面,然后调用两次第二天气温,设置显示长度,又将后半段舍去,放在第一个温度下面,然后在引用一次,舍去前一半数据,以此类推。
- ;=================================================Now
- [MeasureWeatherTemp]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherNOW]
- StringIndex=3
- [MeasureWeatherDesc]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=20
- [MeasureWeatherIcon]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=26
- ;==================================================DayIcon
- ----------开始设置天气状况图标
- [MeasureWeatherIcon1_1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=26
- ;-------------------------
- [MeasureWeatherIcon2_1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=28
- ;-------------------------
- [MeasureWeatherIcon3_1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=30
- [MeasureWeatherIcon1_1_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=27
- ;-------------------------
- [MeasureWeatherIcon2_1_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=29
- ;-------------------------
- [MeasureWeatherIcon3_1_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=31
- ----------这里的思路是因为白天和晚上的温度会变,所以图标也会跟着变,所以势必要同步显示。所以一次要引用6个温度。
- ;==================================================NightIcon
- [MeasureWeatherIcon1_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=27
- ;-------------------------
- [MeasureWeatherIcon2_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=29
- ;-------------------------
- [MeasureWeatherIcon3_D]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=31
- [MeasureWeatherIcon1_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=28
- ;-------------------------
- [MeasureWeatherIcon2_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=30
- ;-------------------------
- [MeasureWeatherIcon3_N]
- Measure=Plugin
- Plugin=Plugins\WebParser.dll
- Url=[MeasureWeatherRSS]
- StringIndex=32
- ;==================================================BG
- ----------设置背景图片
- [meterBackground]
- Meter=IMAGE
- ImageName=BackgroundAnalog.png
- X=0
- Y=0
- ;==================================================Now Day
- ----------白天时候的当前温度和天气状况设置
- [MeterTemp]
- MeasureName=MeasureWeatherTemp ----------引用上文MeasureWeatherTemp
- Meter=STRING
- X=100
- Y=10
- FontColor=255,255,255,205 ----------字体颜色
- FontSize=12 ----------字体大小
- StringAlign=RIGHT ----------对齐方式=右
- StringStyle=NORMAL ----------字体显示:常规
- FontFace=#Font# ----------字体,文章最开始定义的
- Antialias=1 ----------字体平滑处理=1=Ture 若0即为False
- Postfix="°" ----------输出数字后追加 °
- [MeterDesc] ----------天气状况设置
- MeasureName=MeasureWeatherDesc
- Meter=STRING
- X=200
- Y=14
- FontColor=255,255,255,205
- FontSize=8
- StringAlign=RIGHT
- StringStyle=Normal
- FontFace=微软雅黑
- Antialias=1
- [MeterIcon] ----------天气图标设置
- MeasureName=MeasureWeatherIcon
- Meter=IMAGE
- Path=#CurrentPATH#/Day/ ----------图标位置
- X=15
- Y=20
- W=50
- H=50 ----------位置,宽高
- ;==================================================Now Night
- [MeterIcon_N]
- MeasureName=MeasureWeatherIcon
- Meter=IMAGE
- Path=#CurrentPATH#/Night/ ----------因为这里需要白天晚上图标不一样,所以分存两个文件夹
- X=15
- Y=20
- W=50
- H=50
- ;==================================================================Day
- [MeterTemp1_D] ----------明天温度显示
- MeasureName=MeasureWeatherTemp1_D
- Meter=STRING
- X=115
- Y=37
- W=26
- H=15
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ClipString=1
- [MeterIcon1_1_D] ----------明天白天天气状况
- MeasureName=MeasureWeatherIcon1_1_D
- Meter=IMAGE
- Path=#CurrentPATH#/Day/
- X=73
- Y=37
- H=20
- W=20
- [MeterIcon1_1_N] ----------明天夜晚天气状况
- MeasureName=MeasureWeatherIcon1_1_N
- Meter=IMAGE
- Path=#CurrentPATH#/Night/
- X=73
- Y=57
- H=20
- W=20
- ;-------------------------
- [MeterTemp1_1_D]
- MeasureName=MeasureWeatherTemp1_1_D
- Meter=STRING
- X=115
- Y=60
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ;-------------------------
- [MeterTemp2_D]
- MeasureName=MeasureWeatherTemp2_D
- Meter=STRING
- X=160
- Y=37
- W=26
- H=15
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ClipString=1
- [MeterIcon2_1_D]
- MeasureName=MeasureWeatherIcon2_1_D
- Meter=IMAGE
- Path=#CurrentPATH#/Day/
- X=116
- Y=37
- H=20
- W=20
- [MeterIcon2_1_N]
- MeasureName=MeasureWeatherIcon2_1_N
- Meter=IMAGE
- Path=#CurrentPATH#/Night/
- X=116
- Y=57
- H=20
- W=20
- ;-------------------------------
- [MeterTemp2_1_D]
- MeasureName=MeasureWeatherTemp2_1_D
- Meter=STRING
- X=160
- Y=60
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ;-------------------------------
- [MeterTemp3_D]
- MeasureName=MeasureWeatherTemp3_D
- Meter=STRING
- X=202
- Y=37
- W=26
- H=15
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ClipString=1
- [MeterIcon3_1_D]
- MeasureName=MeasureWeatherIcon3_1_D
- Meter=IMAGE
- Path=#CurrentPATH#/Day/
- X=160
- Y=37
- H=20
- W=20
- [MeterIcon3_1_N]
- MeasureName=MeasureWeatherIcon3_1_N
- Meter=IMAGE
- Path=#CurrentPATH#/Night/
- X=160
- Y=57
- H=20
- W=20
- ;-------------------------------
- [MeterTemp3_1_D]
- MeasureName=MeasureWeatherTemp3_1_D
- Meter=STRING
- X=202
- Y=60
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ;==================================================================Night
- [MeterTemp1_N]
- MeasureName=MeasureWeatherTemp1_N
- Meter=STRING
- X=115
- Y=37
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- [MeterIcon1_N]
- MeasureName=MeasureWeatherIcon1_N
- Meter=IMAGE
- Path=#CurrentPATH#/Night/
- X=73
- Y=57
- H=20
- W=20
- [MeterIcon1_D]
- MeasureName=MeasureWeatherIcon1_D
- Meter=IMAGE
- Path=#CurrentPATH#/Day/
- X=73
- Y=37
- H=20
- W=20
- ;-------------------------
- [MeterTemp2_N]
- MeasureName=MeasureWeatherTemp2_N
- Meter=STRING
- X=115
- Y=60
- W=26
- H=15
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ClipString=1
- [MeterIcon2_N]
- MeasureName=MeasureWeatherIcon2_N
- Meter=IMAGE
- Path=#CurrentPATH#/Night/
- X=116
- Y=57
- H=20
- W=20
- [MeterIcon2_D]
- MeasureName=MeasureWeatherIcon2_D
- Meter=IMAGE
- Path=#CurrentPATH#/Day/
- X=116
- Y=37
- H=20
- W=20
- ;-------------------------
- [MeterTemp2_1_N]
- MeasureName=MeasureWeatherTemp2_1_N
- Meter=STRING
- X=160
- Y=37
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ;-------------------------------
- [MeterTemp3_N]
- MeasureName=MeasureWeatherTemp3_N
- Meter=STRING
- X=160
- Y=60
- W=26
- H=15
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ClipString=1
- [MeterIcon3_N]
- MeasureName=MeasureWeatherIcon3_N
- Meter=IMAGE
- Path=#CurrentPATH#/Night/
- X=160
- Y=57
- H=20
- W=20
- [MeterIcon3_D]
- MeasureName=MeasureWeatherIcon3_D
- Meter=IMAGE
- Path=#CurrentPATH#/Day/
- X=160
- Y=37
- H=20
- W=20
- ;-------------------------
- [MeterTemp3_1_N]
- MeasureName=MeasureWeatherTemp3_1_N
- Meter=STRING
- X=202
- Y=37
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ;-------------------------------
- [MeterTemp4_N]
- MeasureName=MeasureWeatherTemp4_N
- Meter=STRING
- X=202
- Y=60
- W=26
- H=15
- FontColor=255,255,255,180
- FontSize=10
- StringAlign=RIGHT
- StringStyle=NORMAL
- FontFace=#Font#
- Antialias=1
- Postfix="°"
- ClipString=1
- ;=============================================Shift
- [MeasureHour]
- Measure=Time ----------抓取时间
- Format=%H ----------显示小时
- [MeasureTime1]
- Measure=Time
- Format="%H"
- IfBelowValue=18
- IfBelowAction=!execute #Show1##Hide1#[!RainmeterRedraw]
- [MeasureTime2]
- Measure=Time
- Format="%H"
- IfEqualValue=18
- IfEqualAction=!execute #Hide2##Show2#[!RainmeterRedraw]
- [MeasureTime3]
- Measure=Time
- Format="%H"
- IfAboveValue=18
- IfAboveAction=!execute #Hide2##Show2#[!RainmeterRedraw]
复制代码 ----------最为精华的一段,抓取当前时间,以判断当前该显示什么。
(最后附上下载地址:http://bbs.rainmeter.cn/thread-55131-1-1.html ) |
评分
-
查看全部评分
|