# 倒计时模块问题 - 系统技巧 - 雨滴社区 - Powered by Discuz!
 找回密码
 点击注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 10679|回复: 26

[教程] 倒计时模块问题

[复制链接]

签到天数: 105 天

[LV.6]常住居民II

发表于 2012-6-12 18:16:59 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?点击注册

x
本帖最后由 donggua158 于 2012-10-5 12:31 编辑

RM版本升级后相应的Script命令有变化,网上下载的倒计时皮肤文件夹中**.lua脚本存在问题;
原版如下:
PROPERTIES = {year=0, month=0, day=0, hour=0, minute=0, second=0}

function Initialize()
        stringDate = tolua.cast(SKIN:GetMeter("Date"), "CMeterString")
        stringHour = tolua.cast(SKIN:GetMeter("Hour"), "CMeterString")
        stringMinute = tolua.cast(SKIN:GetMeter("Minute"), "CMeterString")
        stringSecond = tolua.cast(SKIN:GetMeter("Second"), "CMeterString")


end -- function Initialize

修改方法:
将青色部分替换为以下文字:
        stringDate= SKIN:GetMeter("Date")
        stringHour = SKIN:GetMeter("Hour")
        stringMinute = SKIN:GetMeter("Minute")
        stringSecond = SKIN:GetMeter("Second")

倒计时模块下载地址
[原创皮肤]RM皮肤-----倒计时皮肤下载By DDC
http://bbs.rainmeter.cn/forum.php?mod=viewthread&tid=95339&fromuid=294071

回复

使用道具 举报

签到天数: 2 天

[LV.1]初来乍到

发表于 2012-6-13 08:43:43 | 显示全部楼层
找不到楼主说的这段  我倒计时的内容如下[Rainmeter]
Author=adam
LocalFont=NEUROPOL

[Metadata]
Name=倒计时
Config=
Description=带倒计时功能的记事本
Instructions=输入\n可换行
Version=
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=1
Preview=

[Variables]
@include=#ROOTCONFIGPATH#Variables.inc


FColor=255,255,255
FSize=22




Year=2013
Month=06
Date=04
Hour=00
Minute=00
Second=00


Command1=!RainmeterWriteKeyValue Variables Title "$UserInput$" "#CURRENTPATH#CountDown.ini" X=10 Y=28 W=400
Command2=!RainmeterRefresh #CURRENTCONFIG#

Command3=!RainmeterWriteKeyValue Variables Year "$UserInput$" "#CURRENTPATH#CountDown.ini" X=260 Y=20 DefaultValue="#Year#" W=50
Command4=!RainmeterRefresh #CURRENTCONFIG#

Command5=!RainmeterWriteKeyValue Variables Month "$UserInput$" "#CURRENTPATH#CountDown.ini" X=310 Y=20 DefaultValue="#Month#" W=30
Command6=!RainmeterRefresh #CURRENTCONFIG#

Command7=!RainmeterWriteKeyValue Variables Date "$UserInput$" "#CURRENTPATH#CountDown.ini" X=340 Y=20 DefaultValue="#Date#" W=30
Command8=!RainmeterRefresh #CURRENTCONFIG#

Command9=!RainmeterWriteKeyValue Variables Hour "$UserInput$" "#CURRENTPATH#CountDown.ini" X=370 Y=20 DefaultValue="#Hour#" W=30
Command10=!RainmeterRefresh #CURRENTCONFIG#

Command11=!RainmeterWriteKeyValue Variables Minute "$UserInput$" "#CURRENTPATH#CountDown.ini" X=390 Y=20 DefaultValue="#Minute#" W=30
Command12=!RainmeterRefresh #CURRENTCONFIG#

Command13=!RainmeterWriteKeyValue Variables Notes "$UserInput$" "#CURRENTPATH#CountDown.ini" X=10 Y=55 DefaultValue="#Notes#" H=90 W=400
Command14=!RainmeterRefresh #CURRENTCONFIG#


[LCountDown]
Measure=Script
ScriptFile=#CurrentPath#CountDownLua.lua
TableName=CountDown
Year=#Year#
Month=#Month#
Day=#Date#
Hour=#Hour#
Minute=#Minute#
Second=#Second#

[NewLine]
Measure=Script
ScriptFile=#CurrentPath#NewLine.lua
TableName=NewLine
UpdateDivider=10


;===========================
[MeterFlyout]
DynamicVariables=1
Meter=IMAGE
;ImageName=flyout.png
X=0
Y=-3
H=145
W=350
Group=1
Hidden=0
;===========================





;【显示数据】===========================



[Date]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
;AutoScale=1
StringAlign=Left
FontSize=17
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
Postfix=天
Prefix=""
X=250
Y=20
Group=1
Hidden=0


[Hour]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=17
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
Postfix= 时
Y=r
X=R
Group=1
Hidden=0

[Minute]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=17
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
Postfix=分
Y=r
X=R
Group=1
Hidden=0

[Second]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=17
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
Postfix=秒
Y=r
X=R
Group=1
Hidden=0

;===========================

[EYear]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=14
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
;Text="#Year# /"
Prefix="大学毕业倒计时:"
Group=1
Hidden=0
DynamicVariables=1
X=-250r
Y=-19r


[EMonth]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=16
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
;Text="#Month# /"
LeftMouseUpAction=!RainmeterPluginBang "MInput ExecuteBatch 5-6"
Group=1
Hidden=0
DynamicVariables=1
Y=r
X=R

[EDate]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=16
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
;Text="#Date# "
LeftMouseUpAction=!RainmeterPluginBang "MInput ExecuteBatch 7-8"
Group=1
Hidden=0
DynamicVariables=1
Y=r
X=R

[EHour]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=17
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
;Text=" #Hour# :"
LeftMouseUpAction=!RainmeterPluginBang "MInput ExecuteBatch 9-10"
Group=1
Hidden=0
DynamicVariables=1
Y=r
X=R

[EMinute]
Meter=String
FontColor=#FColor#
FontFace=华康少女文字 - Kelvin
AutoScale=1
StringAlign=Left
FontSize=16
AntiAlias=1
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=0,0,0,240
;Text="#Minute# "
LeftMouseUpAction=!RainmeterPluginBang "MInput ExecuteBatch 11-12"
Group=1
Hidden=0
DynamicVariables=1
Y=r
X=R
回复

使用道具 举报

签到天数: 28 天

[LV.4]偶尔看看III

发表于 2012-6-14 23:33:17 | 显示全部楼层

你好,你这个还需要什么代码才能让时间显示出来呢,我是新手,谢谢了,
回复

使用道具 举报

该用户从未签到

发表于 2012-6-25 16:44:10 | 显示全部楼层
我的也没办法显示数字 应该就是这个问题
回复

使用道具 举报

该用户从未签到

发表于 2012-7-12 15:38:12 | 显示全部楼层
yy449098381 发表于 2012-6-13 08:43
找不到楼主说的这段  我倒计时的内容如下[Rainmeter]
Author=adam
LocalFont=NEUROPOL

LZ说的这段在“CountDownLua.lua”里。
回复

使用道具 举报

该用户从未签到

发表于 2012-7-13 06:13:01 | 显示全部楼层
又看了一次
回复

使用道具 举报

签到天数: 1 天

[LV.1]初来乍到

发表于 2012-7-13 11:21:00 | 显示全部楼层
我表示看不懂
回复

使用道具 举报

签到天数: 105 天

[LV.6]常住居民II

 楼主| 发表于 2012-8-30 15:01:03 | 显示全部楼层
本帖最后由 donggua158 于 2012-8-30 15:11 编辑
zapp_烬 发表于 2012-6-14 23:33
你好,你这个还需要什么代码才能让时间显示出来呢,我是新手,谢谢了,

lua脚本编写问题,你可以到这儿下载
http://d.119g.com/f/29A9C98F7D5E7BC0.html
效果图见我空间http://user.qzone.qq.com/991146299/blog/1340538738
回复

使用道具 举报

签到天数: 105 天

[LV.6]常住居民II

 楼主| 发表于 2012-8-31 12:24:59 | 显示全部楼层
yy449098381 发表于 2012-6-13 08:43
找不到楼主说的这段  我倒计时的内容如下[Rainmeter]
Author=adam
LocalFont=NEUROPOL

在Script中,即*.lua文件中
回复

使用道具 举报

签到天数: 105 天

[LV.6]常住居民II

 楼主| 发表于 2012-8-31 12:25:35 | 显示全部楼层
Dora想去演唱会 发表于 2012-6-25 16:44
我的也没办法显示数字 应该就是这个问题

[原创皮肤]RM皮肤-----倒计时皮肤下载By DDC
http://bbs.rainmeter.cn/forum.ph ... &fromuid=294071
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点击注册

本版积分规则

快速回复 返回顶部 返回列表