Sign in to follow this  
Followers 0
SlimShady

Alarm-clock

17 posts in this topic

#1 ·  Posted (edited)

NOTE: This is a GUI version. If you don't have the latest unstable version of AutoIt, the script won't work.

Unless you use the executable (it's in the zip).

I created my own clock using the new GUI features.

It also has the ability to notify you for an event (called: alarms).

You can even schedule repeated alarms. So you'll be notified on a daily basis or weekly on a specific day.

The clock resides in a place that's not being used by Windows Explorer and Internet Explorer. (It's always on top)

Current features are:

  • Set alarms/schedules
  • Edit alarms/schedules
  • Cancel/delete alarms/schedules
  • Run a program when alarm is set off (not yet)
  • Play a sound file when alarm is set off (not yet)
  • Enable/Disable alarms function (default is enabled) (not yet)
  • Enable/Disable default sound (default is disabled)
A readme file is included. It contains information of how to use this script.

Download the script below:

http://www.autoitscript.com/fileman/users/public/SlimShady/AlarmClock.zip

Edited by SlimShady

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

note: The following suggestion will not work. Please see the following post.

Regarding your update restriction: You could use the AdLibEnable() function to keep displaying your clock text even when the main script is paused. I have not taken the time to read your code, so understand that your variables and structure may vary slightly: this is only the concept. Something like this:

;preperation code goes here

AdLibEnable("UpdateTime", 1000);call function UpdateTime() every 1 second

;code to test alarms, and do other stuff

Func UpdateTime()
;do stuff to test time
;update the window with time
EndFunc

If you have a need to disable the clock at some point in your code, just call AdLibDisable() to halt the previous command.

Edited to reflect the validity of the folowing post

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Regarding your update restriction: You could use the AdLibEnable() function to keep displaying your clock text even when the main script is paused.

Last I checked, when AutoIt pauses or "blocks" due to a MsgBox/FileOpenDialog/ect., the Adlib function is also paused. This should be added to the documentation.

SlimShady, you could use two separate scripts: one to display the clock, and another to handle the input. However, there is not easy way to tranfer data from one to the other. Pasing data via the clipboard [ClipPut()/ClipGet()] is usually the easiest way. (By the way: EnvSet--which also needs a documentation improvement--will not work for transfering data between to simultaneously running scripts.)


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

AdLibEnable didn't work, but I left it in the scripts.

It's like a standalone, infinite For...Next loop, nice.

Anyways, script is updated, see first post.

- Changed the exit function a bit

- Cleaned it up using AutoIt Tidy

Edited by SlimShady

Share this post


Link to post
Share on other sites

What about avoiding the use of the registry?Is that possible? A ini file may be?

Rember that a application that

-does not require installation

-does not write to the registry

-does not create or modify files outside of its own directory

is the best :D

Share this post


Link to post
Share on other sites

I've never used the ini read/write function. But I will give it a try.

I'm now finishing up my remote download (and execute) script, after that I will create an ini file for this script.

Share this post


Link to post
Share on other sites

I'm now finishing up my remote download (and execute) script..

Can you please show us the code, when you're finished with it ? :D

Share this post


Link to post
Share on other sites

See here.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Changes:

  • Using alarms.ini instead of the registry
Save your alarms and delete the registry key:

HKEY_CURRENT_USER\Software\Alarms

Edited by SlimShady

Share this post


Link to post
Share on other sites

See here.

Thanks for sharing !

Share this post


Link to post
Share on other sites

If you find a bug, please post it here.

Thank you.

Share this post


Link to post
Share on other sites

Changes:

  • Using alarms.ini instead of the registry
Save your alarms and delete the registry key:

HKEY_CURRENT_USER\Software\Alarms

Great guy! you are the best. :D

Share this post


Link to post
Share on other sites

Thank you.

It took a while to convert every registry function into an ini function.

But luckily nothing broke.

Share this post


Link to post
Share on other sites

I think that the position in the right down corner it is not the best... I should put in in the top right..., like 100 pixel from the border... it is a zone that usually is occuped by empty title bar.

This is only a matter of taste anyway...

Share this post


Link to post
Share on other sites

I am used to check the clock in the right bottom of the screen.

Like I said: it's a replacement. You can adjust the screen at line 24 of the script.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Updated! See first post.

If you experience strange behavior, please report.

Any suggestions/ideas are welcome.

Edited by SlimShady

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0