Church Bells Tower - auto bell chimer

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Bon
Posts: 17
Joined: 11 Jan 2014, 07:31

Re: Church Bells Tower - auto bell chimer

17 Oct 2018, 14:59

@Marius: I mean that the code calculates the number of milliseconds to the next even 15 minutes. So if the app starts at 10:08:10, the number of msecs will be 410000. But at the end of theChimer the number of msecs to the next time will be closer to 15 * 60 * 1000 = 900000, the exact number depending on how long it has run, ie the number of strikes. So it should be recalculated at the end of theChimer.
Quidquid Latine dictum sit altum videtur
"Anything said in Latin sounds profound"
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

17 Oct 2018, 16:29

Okay, thank you very much. I will test this.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

18 Oct 2018, 05:34

Version 1.7.2 released. Includes the improvement suggested by Bon. THANK YOU VERY MUCH BON :-).

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

21 Oct 2018, 06:50

Hello, people !

New version: v1.7.5. It brings a new feature: display a random Bible quote periodically [every few hours]. This feature is only for the die-hard Christians or... other people who will laugh at the 'careful' selection of quotes. ;-)

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

23 Oct 2018, 06:12

Important bug fixes and improvements: v1.7.6.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

26 Oct 2018, 03:09

New version: v1.8.0

I recoded/overhauled the whole OSD thing, because it was messy and yield poor results. Now it always has the right width and height based on the font size. I am happy with it now :-). Bonus: AHK file size went down by 5 kilobytes.

Also added more Bible quotes. Now there are 380 of them.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

30 Oct 2018, 07:09

New update: version 1.8.1.

Bug fixes related to how previous or next equinoxes/solstices dates are calculated. The code was simplified, and it was reduced by about 5 kilobytes.

Improvements to how bible quotes are displayied. The OSD adjusts the Y position, based on the length of the quote.

Added more Bible quotes. Now there are 450.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

05 Nov 2018, 13:05

Hello!

New major version: 1.9.0.

- new option to set the font size for Bible quotes
- new option to regularly play semantron drumming sounds on days of feast in Christianity; for Orthodox and Catholic worshippers
- option to display / indicate / observe Christian feast days
- more sounds added
- introduced more Bible quotes; the total now is 550
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Church Bells Tower - auto bell chimer

07 Nov 2018, 10:46

That's a nice idea you got here. However, I'd replace bible quotes with famous movie quotes, feast days with actor birthdays/dates of death (pictures included), quarterly/hourly chimes with snippets of closest representative music and… whatever else required to completely get rid of religion.
Because, in my - humble or not - opinion, religion, generally, is but a big, fat lie.

But that's just one of the versions this script could/should sport. To be fair to the rest of the world you should add options for islam, buddhism, hinduism and whatever other (major) religions may be out there. Make everybody happy in their own (non)beliefs. Tough task, huh… ;)
Part of my AHK work can be found here.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

07 Nov 2018, 14:04

Hello!

New version: 1.9.1.

Added an option to list the feasts/holidays/celebrations recognized by this script. It offers the list for each year, for Catholic or Orthodox religions.

Added more feasts, corrected errors. Bug fixes too :-)

@drugwash: I have read your comment. This script is not, I admit, for light hearted people :-)..

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Church Bells Tower - auto bell chimer

07 Nov 2018, 14:49

But I am dead serious.
Part of my AHK work can be found here.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

07 Nov 2018, 17:06

The code is now available on GitHub.
https://github.com/marius-sucan/ChurchBellsTower

v1.9.2 - 2018 / 11 / 08
- [new] "Locate" button at OSD options, meant to help users with OSD positioning, if they do not figure that they can drag the OSD :-)
- [new] "Display last Bible quote", menu option; only enabled after a quote was displayied
- [improvement] Bible quotes are now centered on screen, on the monitor where the mouse cursor is

v1.9.3 - 2018 / 11 / 09
- [new] option to dim the screen when displaying Bible quotes
- bug fixes regarding the multi-monitor support

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

11 Nov 2018, 06:45

Hello, people !

In the newest version, v1.9.4... I fixed a major bug, a memory leak that determined an ever increasing memory usage, the longer it was running.

If anyone here is using Church Bells Tower, please upgrade to / download the latest version.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

16 Nov 2018, 06:00

New version:

v1.9.7 - 2018 / 11 / 16
- [new] share Bible quote button when a quote is displayied
- [new] rounded corners for the On-Screen Display

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

24 Nov 2018, 11:07

New version: 1.9.8.

- option to disable / activate round corners.
- [new] every OSD window fades in & out.
- minor fixes

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

27 Nov 2018, 14:06

I also made a short presentation video:

-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

10 Dec 2018, 16:43

Hallo!

New version...

v2.0 - 2018 / 12 / 10
- [new] About window is themed according to the current time: day or night
- [new] context menu at About and Settings
- [new] added Christmas bells on Christmas Day :-)

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Church Bells Tower - auto bell chimer

11 Dec 2018, 03:06

Curiosity got the best of me and I finally downloaded the code. On this note, it may be a good idea to mention the approximate package size somewhere here next to download links - 18 MB for the code package was quite… surprising. On the same note, maybe those 21 MB (when unpacked) MP3 sounds could be replaced by MIDI sequences, which would significantly decrease the package size.

About the code:
• I like that the OSD tooltip shows when hovering the tray icon, I like the fact that it can show the long date on click, but I don't like that it doesn't stay on long date. I mean, it'd be nice to have it on toggle, so if tray icon was clicked once it should always display long date afterwards on hover until clicked again.

• When volume is very low - I don't want to scare off my kittens or upset the neighbors - the tick-tock sound can't be heard. Dunno if it's doable but I guess it should have its own volume level independently of the main bell/chime volume. Well, with MIDI I think it could be done by setting each channel's volume and/or notes' velocity.

• I'm not sure how exactly the "progressbars" in the About window should look like, but here on XP they don't look very nice. Maybe I don't have the right font face/version… (didn't look through the code yet)? Why not use standard progressbars…?
CBT-progressbars.png
CBT-progressbars.png (646.59 KiB) Viewed 6068 times
EDIT: After looking through the code and performing some tests I found out that XP doesn't natively have any font that can display the characters used in those fake progressbars. However, there's chance that the user may have installed additional fonts, at least one of them being capable of displaying those characters. On my XP system I found - by using BabelMap, a good free application - that there are four compatible fonts installed. Adding the following before the two corresponding lines of code allowed a much better progress display:

Code: Select all

Gui, Font,, Arial ; only as backup, doesn't have all characters in XP
Gui, Font,, Symbola
Gui, Font,, Segoe UI Symbol
Gui, Font,, DejaVu Sans
Gui, Font,, DejaVu LGC Sans
There may be many other (free) fonts out there capable of displayng those characters but relying on the user having any of them installed or using the latest OS version is kinda shady; I'd go with a GDIplus-drawn progressbar if you want those markers, otherwise a regular progressbar control should be enough for the purpose.
20181211112233.png
20181211112233.png (646.59 KiB) Viewed 6062 times
/EDIT

• Bible quote interval can't be set for one hour or larger than 12 hours; why? Someone might want it every hour, someone else might want it once a day (every 24h) either at fixed or random time.

• The list of holidays/celebrations doesn't look very nice and the fragmentation Easter / Other seems forced. Maybe a ListView would be better, would allow some text alignment? And if you wanna keep the Easter / Other format, a tab control should probably do the trick.
Also, maybe it would be a good idea to have a tray menu item to display that list more quickly and without the additional burdain of having the Customize window cover other windows.

Otherwise, for the little time I tested the script it works well as far as I can tell. Maybe in time I'll find some other things that can be improved. As I said before, I'd like it to be some kind of framework upon which any kind of calendar (hint, hint! :roll: ) could be built, not necessarily a religious one. That way, users could build their own packages complete with dates, names, pictures/icons, text/quotes, sounds, and feed the desired one to the script. Even multiple packages could be loaded and used simultaneously or one at a time, upon user choice. But maybe I'm stretching too much. :)

Well, good luck ahead! :thumbup:

EDIT, @ JoeDF and/or any other admins: Sorry to bring back this issue but image uploading is still screwed up for me, at least with the prosilver theme under QtWeb 3.8.5 in XP-SP3:
AHK board upload issue.png
AHK board upload issue.png (1.02 MiB) Viewed 6062 times
Part of my AHK work can be found here.
garry
Posts: 3720
Joined: 22 Dec 2013, 12:50

Re: Church Bells Tower - auto bell chimer

11 Dec 2018, 04:57

thank you , I use the older version at the moment, glad to see clock every hour

( video example )
mulțumesc, pentru români ,dacă utilizați videolan

Code: Select all

Filename1=VLCPlugin & ActiveX Test
Gui,2:default
Gui,2:-border
GUI,2:Font,s14 cGray,Lucida Console
Gui,2: -DPIScale
Gui,2: Color, Black,Black 

;id1=iCKMzrPy4t4;aquela janela virada pro mar
id1=_b9R_x_imBM;ROMANIA Drumul Transfăgărășan 
;id1=EFSZnC3-E4A;Lilian de Celis                 ;- ( not works embed blocked from user )
;id1=yKbzBGntI8Q;Li Xiang _lan - Ye lai xiang    ;- ( not works embed blocked from user )
;id1=CK-pDtdW4Ug;TEST                        ;- ok
stringsplit,c,id1,`;

wa:=A_screenwidth
ha:=A_screenHeight
xx:=105
LW  :=(wa*88) /xx 
LH  :=(ha*88) /xx  
GW  :=(wa*90) /xx 
GH  :=(ha*95) /xx  

vlc1        =%A_programfiles%\VideoLAN\VLC\vlc.exe
ifnotexist,%vlc1% 
  {
  msgbox,needs=`n%vlc1%
  exitapp
  }
xxa=VideoLAN.VLCPlugin.2
Gui,2:Add,ActiveX, x40    y30     w%lw%  h%lh%  vVlcx,%xxa%
y:=(ha*91) /xx  
Gui,2:Add,Text,x50 y%y% , %c2%   ( use ESC to quit )
Gui,2:Show,x0 y0 w%gw% h%gh%,%filename1%
gosub,aa1
return
2Guiclose:
exitapp
esc::exitapp
;------------
aa1:
F1=https://www.youtube.com/watch?v=%c1%
     vlcx.playlist.add(F1,"","""""")
     vlcx.playlist.next()
return
;============ END script Youtube PLAY =====================================
robodesign
Posts: 932
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

Re: Church Bells Tower - auto bell chimer

11 Dec 2018, 04:58

Hello, Drugwash!

Thank you very much for the suggestions. Really good ones.

I will implement the fix for the font of the fake progress bars.


You will never reproduce the bell sounds with Midi :-). But hey, good luck trying. I used MP3, in mono, to keep file sizes to the minimum.

Bible quotes interval has two modes: include or exclude. If you set limit chimes period to «play chimes only», it will play only in the specified interval. Otherwise, if you set it to... «keep silence...», it will NOT play in the specified interval. I hope this clears it.


The idea to have the holidays listed using LVs is superb! I should do this as soon as possible. I hope it is not too much hassle for me ;-).

Thanks again for the suggestions. Good ones! I am glad it still works on XP.

Best regards, Marius.
Drugwash wrote:
11 Dec 2018, 03:06
Curiosity got the best of me and I finally downloaded the code. On this note, it may be a good idea to mention the approximate package size somewhere here next to download links - 18 MB for the code package was quite… surprising. On the same note, maybe those 21 MB (when unpacked) MP3 sounds could be replaced by MIDI sequences, which would significantly decrease the package size.

About the code:
• I like that the OSD tooltip shows when hovering the tray icon, I like the fact that it can show the long date on click, but I don't like that it doesn't stay on long date. I mean, it'd be nice to have it on toggle, so if tray icon was clicked once it should always display long date afterwards on hover until clicked again.

• When volume is very low - I don't want to scare off my kittens or upset the neighbors - the tick-tock sound can't be heard. Dunno if it's doable but I guess it should have its own volume level independently of the main bell/chime volume. Well, with MIDI I think it could be done by setting each channel's volume and/or notes' velocity.

• I'm not sure how exactly the "progressbars" in the About window should look like, but here on XP they don't look very nice. Maybe I don't have the right font face/version… (didn't look through the code yet)? Why not use standard progressbars…?
CBT-progressbars.png
EDIT: After looking through the code and performing some tests I found out that XP doesn't natively have any font that can display the characters used in those fake progressbars. However, there's chance that the user may have installed additional fonts, at least one of them being capable of displaying those characters. On my XP system I found - by using BabelMap, a good free application - that there are four compatible fonts installed. Adding the following before the two corresponding lines of code allowed a much better progress display:

Code: Select all

Gui, Font,, Arial ; only as backup, doesn't have all characters in XP
Gui, Font,, Symbola
Gui, Font,, Segoe UI Symbol
Gui, Font,, DejaVu Sans
Gui, Font,, DejaVu LGC Sans
There may be many other (free) fonts out there capable of displayng those characters but relying on the user having any of them installed or using the latest OS version is kinda shady; I'd go with a GDIplus-drawn progressbar if you want those markers, otherwise a regular progressbar control should be enough for the purpose.
20181211112233.png
/EDIT

• Bible quote interval can't be set for one hour or larger than 12 hours; why? Someone might want it every hour, someone else might want it once a day (every 24h) either at fixed or random time.

• The list of holidays/celebrations doesn't look very nice and the fragmentation Easter / Other seems forced. Maybe a ListView would be better, would allow some text alignment? And if you wanna keep the Easter / Other format, a tab control should probably do the trick.
Also, maybe it would be a good idea to have a tray menu item to display that list more quickly and without the additional burdain of having the Customize window cover other windows.

Otherwise, for the little time I tested the script it works well as far as I can tell. Maybe in time I'll find some other things that can be improved. As I said before, I'd like it to be some kind of framework upon which any kind of calendar (hint, hint! :roll: ) could be built, not necessarily a religious one. That way, users could build their own packages complete with dates, names, pictures/icons, text/quotes, sounds, and feed the desired one to the script. Even multiple packages could be loaded and used simultaneously or one at a time, upon user choice. But maybe I'm stretching too much. :)

Well, good luck ahead! :thumbup:

EDIT, @ JoeDF and/or any other admins: Sorry to bring back this issue but image uploading is still screwed up for me, at least with the prosilver theme under QtWeb 3.8.5 in XP-SP3:
AHK board upload issue.png
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: furqan and 83 guests