Welcome, Guest
Please Login or Register.    Lost Password?

missing key/variable "SnoozeTime"
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: missing key/variable "SnoozeTime"
#204
missing key/variable "SnoozeTime" 7 Years, 10 Months ago  
Hey there,

In pre-2.0 times, there was a variable called SnoozeTime which determined how long after "snoozing" a reminder it would appear again.
I couldn't find such a key in Rainlendar2's INI - has this been removed? The default 60 seconds are way too short IMHO...
Ace_NoOne
Senior Boarder
Posts: 52
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#232
Re:missing key/variable "SnoozeTime" 7 Years, 10 Months ago  
It's defined in Scripts/alarm.lua (the value 60 in Rainlendar_SnoozeAlarm-function's parameter).<br><br>Post edited by: Rainy, at: 2006/11/01 13:36
Rainy
Moderator
Posts: 5940
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#233
Re:missing key/variable "SnoozeTime" 7 Years, 10 Months ago  
Thanks for the quick response!

From that file:
-- DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN WHEN YOU UPGRADE RAINLENDAR!
-- TODO: calculate some good snooze timeThis kinda made me smirk...
Ace_NoOne
Senior Boarder
Posts: 52
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#248
Re:missing key/variable "SnoozeTime" 7 Years, 10 Months ago  
Yes, the alarm.lua shouldn't be normally edited since the installer will overwrite it. The script should calculate the snooze time from the alarm time with some clever algorithm but it's not ready yet.

It is possible to create a custom snooze function and put it in another file (anything that ends with .lua can be used) so that it doesn't get overwritten. You would have to edit the skin too to change the snooze button to run the new function. I can write some more detailed instructions if you want to try it.
Rainy
Moderator
Posts: 5940
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#255
Re:missing key/variable "SnoozeTime" 7 Years, 10 Months ago  
Rainy wrote:
the alarm.lua shouldn't be normally edited since the installer will overwrite itMy suggestion: Create a modifications folder whose contents override any default values/functions (many games use this method for mods). So for example the file .../RAINLENDAR/SCRIPTS/ALARM.LUA would be merged with .../RAINLENDAR/MODS/SCRIPTS/ALARM.LUA, whereas function definitions in the latter would take precedence over those in the original file.

Rainy wrote:
The script should calculate the snooze time from the alarm time with some clever algorithm but it's not ready yet.That sounds very interesting indeed; however, I don't quite understand how the alarm time is related to snooze time preferences!?
Let's say I have a reminder set to 14 days in advance, then I might still be reminded again 60 seconds after snoozing an alarm, or after several hours, depending on how busy I am when the alarm pops up (that's why I came up with this suggestion).

Rainy wrote:
It is possible to create a custom snooze function and put it in another file (anything that ends with .lua can be used) so that it doesn't get overwritten. You would have to edit the skin too to change the snooze button to run the new function. I can write some more detailed instructions if you want to try it.My preliminary analysis (i.e. I didn't test it yet) tells me that I'd only have to change the respective function call (action=&quot;Global_SnoozeAll()&quot; in the ALARM.XML), and then create a new file in the SCRIPTS dir containing the new/altered function, e.g.:
Code:

function Global_CustomSnoozeAll()
uidAlarms = Rainlendar_GetAlarmItems()
for key, value in pairs (uidAlarms) do
Rainlendar_SnoozeAlarm(value, 300)
end
Rainlendar_Redraw(1)
end

<br><br>Post edited by: Ace_NoOne, at: 2006/11/01 16:58
Ace_NoOne
Senior Boarder
Posts: 52
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#286
Re:missing key/variable "SnoozeTime" 7 Years, 10 Months ago  
A separate folder for the user's scripts might be a good idea. I'll think about it.

And yes, changing the function name in the alarm.xml creating the function in a lua file is all that is needed.
Rainy
Moderator
Posts: 5940
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop