Error 403 from Google Calendar? Upgrade to the new Google Calendar support. See here for details. close
Welcome, Guest
Please Login or Register.    Lost Password?

Hourly Chime?
(1 viewing) (1) Guest
Go to bottomPage: 123456
TOPIC: Hourly Chime?
#17096
Hourly Chime? 2 Years, 7 Months ago  
Hi folks!

(Sorry if this has been asked before but I didn't find any matches to my Forum search.)

Is there any way to set up an audible repeating alert?
Do be more specific, I would like to have an Hourly Chime.

I have a certain .WAV file I would like to hear on the hour, and have it play just once.
No need for a box or window to open, just the sound being played each hour.

I'm sure there must be a way to do this, I just can't figure it out without your help!

Thanks in advance!
Neilyum2
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#17098
Re:Hourly Chime? 2 Years, 7 Months ago  
You can create a script and put it on the app/scripts folder (e.g. C:\Program Files\Rainlendar2\scripts on Windows).

This would be the code:
Code:

--
-- A callback function for the timer. This gets called every time the timer triggers.
-- Returns true so the timer will go on forever (false would stop the timer).
--
function Launch_Chime_OnTimer()
  time = os.date("%H:%M:%S")
  _, _, tHour, tMin, tSec = time:find("(%d-):(%d+):(%d+)") 
  tHour = tonumber(tHour)
  tMin = tonumber(tMin)
  tSec = tonumber(tSec)
  if ((tSec == 0) and (tMin == 0)) then
    Rainlendar_PlaySound("C:\\[folder]\\chime.wav")
  end
end

Rainlendar_CreateTimer(1000, Launch_Chime_OnTimer, "")


Replace [folder] with the path where you have the wav file. (remove the C:\\ if you're using Linux). Save the file as chime.lua (or any name you want) and copy to the scripts folder.

The chime will sound every hour at o'clock. You can reuse this code to sound every half hour (tMin == 30) or quarter (tMin % 15 == 0).
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
Last Edit: 2012/05/02 20:32 By Jorge_Luis.
The administrator has disabled public write access.
 
#17100
Re:Hourly Chime? 2 Years, 7 Months ago  
First of all, thank you Jorge_Luis for your quick reply!
Second of all, I am *thrilled* that my request is even possible!

Unfortunately, I know less than nothing about scripting, so please bear with me through the following questions:

Do I / should I simply copy & paste the info from your post?
If so, where do I paste it?
If not, then could you please nudge me in the right direction?

(By the way, I'm running Windows7/64bit/16GB RAM)

I really appreciate your help!
Neilyum2
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#17104
Re:Hourly Chime? 2 Years, 7 Months ago  
Knowing that you're using W7, then extract the 2 files from the zip attached to the folder C:\Program Files\Rainlendar2\scripts.
Also you can change the wav file with the one you have (I found this one on the net).
If you have the wav file in another folder, edit the Railendar_PlaySound line in the .lua file or move it and replace the one from the zip.
File Attachment:
File Name: chime.zip
File Size: 43804
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#17106
Re:Hourly Chime? 2 Years, 7 Months ago  
Hi Jorge!

I DL the zip and tried to extract both files to C:\Program Files\Rainlendar2\scripts as you instructed, but unfortunately it did not work.

I noticed that the Rainlendar2 folder is actually located in C:\Program Files (x86) on my Win7x64 PC. Would this explain the problem?

I also tried opening the .lua file with Notepad to read it, but it would not let me make any changes.

I feel like we're SO close!

Looking forward to your next advice!
Neilyum2
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#17107
Re:Hourly Chime? 2 Years, 7 Months ago  
I'm not at home right now, but you can use the code from first post only replacing [folder] with your one, in this case: c:\\program files (x86)\\Rainlendar2\\scripts\\chime.wav for the chime.lua file.
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
Go to topPage: 123456
get the latest posts directly to your desktop