View Full Version : Check system date/ time every 30 Minutes
patrick6
06-13-2004, 05:38 PM
I am trying to make this program check the system date/ time every 30 minutes. If the date / time match a date on the calender then application.restore, or open a new small window to say something, else it stays in the system tray.
Can someone please take a look and help me?
Thanks,
Patrick
Intrigued
06-13-2004, 10:02 PM
Patrick6, I have attached my attempt (your code with my code inserts) to help out. Let me know if this is what you needed (and if there are any problems with my code inserts).
Now, I have added code (with comments) to the following sections:
1. Project's Global Functions section
2. The Add/Update button's On Click event
3. Finally, to the Page's On Timer Any feedback (good, bad, the ugly (grin)) would be be appreciated.
[Late Additional Comment/Tip]
Also, instead of waiting for the 30 minutes to check this application I did two (2) things:
1. I adjusted the first time to check for in the Page's On Timer (00 <- that one)
2. I then found the file you are saving the 'Reminders' to and opened such and closed the file to check to see if I was inserting/deleting as I clicked the 'Clear' and 'Add/Update' buttons. Also, to see how you and exactly (string wise) you had the application add into such. So I would know how to tackle this project's setback.
Sincerely,
patrick6
06-14-2004, 07:05 AM
Thank you. :p Everything works perfectly.
Is there any way to make the pop up show the contents of the blog for that day? That is kind of what I was shooting for. (I wanted it to pop up a small (480 x 300) size new window.)
Without using a separate app or flash I did not know how to do that.
I had not thought about what you said about it showing the reminder every second for 60 seconds the way I had the code :wow That would have been interesting to say the least....
Is there any way to set the time (or times) it will show during the day?
The comments you inserted make it easier for me to grasp.
Thanks again,
Patrick
Intrigued
06-14-2004, 10:58 PM
Patrick6... I did not forget you. We had a power outage and I was unable to work on this project this evening. I will revisit such tomorrow, barring any other setbacks on my end. (grin)
longedge
06-15-2004, 06:19 AM
We had a power outage and I was unable to work on this project this evening.
Don't you just hate it when that happens mid session, things just aren't what they used to be. I only get about three months useful life out of my twin hamster generator nowadays, I seem to be forever replacing the power units. My emergency fall-back unit causes problems too, my wife just can't get the hang of keeping up a constant speed and keeps pedalling too fast....
patrick6
06-15-2004, 06:53 AM
No problem. I understand. It has been raining / storming here since late Saturday too...
Thanks,
Patrick
Intrigued
06-15-2004, 03:10 PM
Don't you just hate it when that happens mid session, things just aren't what they used to be. I only get about three months useful life out of my twin hamster generator nowadays, I seem to be forever replacing the power units. My emergency fall-back unit causes problems too, my wife just can't get the hang of keeping up a constant speed and keeps pedalling too fast....
Ha! Ha!
Patrick6 thank you. Power went out again today (several powerlines down yesterday through out the area). We'll see how it is doing tonight, when I get in front of my 'coding machine.'
Intrigued
06-16-2004, 01:42 AM
First off... I.R. has an understandable low file (size) sharing limit. With that said Patrick6... I went out and created (very quick, only had to supply a 'free' web Email account) online storage account. It's only good for 5 days or so. Here is the link:
http://www.globedesk.com
When (if) you make an account I can add your name to the list they give each of us (for sharing files) and then their documentation says you should see the application in your area (in so many words). Sorry for the inconvenience nontheless Patrick6.
That said... here is the code talk now:
Patrick6, I tell you what. I have added a couple three functions and that popup dialog window you were looking for (480x300, with actually Paragraph area a shade less because of Page title placement and the exit button).
I also created the skeleton for a possible solution to the question about setting say an alarm for the reminder(s). The ListBox object was used for such and I populated 48 lines in that object with 12:00 AM to 11:30 PM style time formats (different style for the DataText, btw).
I again commented the parts I have added into your source.
If you want to cut to the chace and see the popup 'reminder' window... you can do the same as before and change the current_minute variable to say a minute ahead of what your system clock is and then quickly 'F5' (preview) the application.
What needs to be finished:
Set Alarm Time:
Work with functions created (one option) and populate the reminder popup the way you would prefer to have such done.
Conclusion:
Remember, I am relatively new myself so you may find an all together better way of handling this situation. I only hope that at least some of what I have put forth helps in the end, with concerns to your project.
Sincerely,
patrick6
06-16-2004, 05:13 AM
My account is created patrick6 being the username.
I have never used a file storage service before. That's pretty cool.
I am very new to this too. Functions are what I am having trouble with so far.
if you don't mind, I would like to take a look and ask some questions about how things work...
Thanks for all of your help.
Patrick
Intrigued
06-16-2004, 10:03 AM
You should now see the .apz project file in your inbox of that account.
Sincerely,
patrick6
06-16-2004, 05:59 PM
That works like a charm ! :yes :yes
Would there be any reason I can't combine the two functions: reminder and runreminder so that it only reminds you of something on the current date.
My original intent was to have it pop up before an important event, meeting, etc...(that was why I wanted to be able to select a time)
One way I had thought to be able to use the program is to be able to choose, at the time when you write the memo, what date and time you want to be reminded. I was not sure if that would be too easy at this point.
It seems there would almost have to be a table or sqlite database to store all of the blogs, time and dates to remind....
If you have any ideas or suggestions I am more than open to them.
You said you were beginning but do you have previous programming experience? I see and understand a lot of the code but then I see lines of code that I would not have thought to put in.
I am trying to learn, but you are miles ahead of me....
Thanks again for your help.
Patrick
Intrigued
06-16-2004, 06:54 PM
Would there be any reason I can't combine the two functions: reminder and runreminder so that it only reminds you of something on the current date.
Combining those two functions could open even more possibilities, for sure.
One way I had thought to be able to use the program is to be able to choose, at the time when you write the memo, what date and time you want to be reminded. I was not sure if that would be too easy at this point.
Your definitely on the right track with those suggestions. I pondered use of some of the String.(pickanaction) actions with regards to the Alarm (isolate just the hours, then minutes) Timer.
You said you were beginning but do you have previous programming experience? I see and understand a lot of the code but then I see lines of code that I would not have thought to put in.
The previous programming experience I have stems from some High school, College and the rest from just 'playing'. I never held a position say as a programmer of sorts.
As far as miles ahead... I gracefully disagree, but appreciate your comment. With AMS 5 (Pro for my situation) we are all new. As the 'LUA' embedded scripting language is new for this application. Your coding examples offered an interesting peek at what the Calendar plugin can do. I have not (as I now sit with a print out of the help file, though) gone full bore into this plugin.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.