#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    13
    Rep Power
    0

    Question Reminder Tkinter


    Hi everyone,

    I want to make a reminder using tkinter.How I can do this?
    Is there a special module or some tools in python(or in tkinter) that can help me..?

    For example:

    I want in specified time (e.x. 14:00 or 18:00 etc) to create a messagebox,that it will say "It's time for walk" and if it is possible to do a short sound (or a music track).


    Before, coding in Visual Basic as remember I used something like "timer"..But I can't remember more about this.. :P


    Thanks in advance...
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,851
    Rep Power
    481

    Is this a programming exercise or need of an application?


    What operating system do you use?

    Wouldn't you be better off using desktop email/calendar program or installing a reminder program of which there must be many free available versions?

    If this is a programming exercise then is the question answered by

    import time
    time.sleep(seconds)
    remind() # ?


    Shouldn't you instead use your operating system scheduler to run programs at specified time?

    Do you not know how to play sound on your system?

    Is this a python problem "make tkinter pop up a window"?

    Why use python at all? Your task might be better as a shell script.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    13
    Rep Power
    0
    Originally Posted by b49P23TIvg
    What operating system do you use?

    Wouldn't you be better off using desktop email/calendar program or installing a reminder program of which there must be many free available versions?

    If this is a programming exercise then is the question answered by

    import time
    time.sleep(seconds)
    remind() # ?


    Shouldn't you instead use your operating system scheduler to run programs at specified time?

    Do you not know how to play sound on your system?

    Is this a python problem "make tkinter pop up a window"?

    Why use python at all? Your task might be better as a shell script.
    I use Windows 7 32bit.

    As you said it is a programming exercise and I have to make a reminder using tkinter.

    To be more specified :

    My main project is to help people who suffer from alzheimer disease.

    So,one of my targets is to make a reminder for helping them do the necessary activities/things.

    For example,

    At 14:00 o'clock..Create a messagebox (and if it possible play a sound)..saying "It's time to eat".
    Then at 18:00 o'clock..Create a messagebox (and if it possible play a sound)..saying "It's time for a walk".
    etc.

    So, my title is right :P

    Can you help me..?


    Thanks.
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,851
    Rep Power
    481
    OK. Some elements of the project follow. I still recommend you use your system task scheduler. You'll need to write code to set up the messages, sounds, and times.
    Code:
    # >>> help(winsound.PlaySound)  # self help
    
    import sys
    try:
        import winsound
    except:
        pass
    
    try:
        import tkinter
    except:
        import Tkinter as tkinter
    
    sound = r'C:\WINDOWS\Media\Chimes.wav'
    message = 'Breakfast'
    
    # read sound from sys.argv
    # likewise obtain message from sys.argv
    
    try:
        winsound.PlaySound(r'C:\WINDOWS\Media\Chimes.wav',0)
    except:
        pass
    
    root = tkinter.Tk()
    root.title('reminder')
    root.pack_propagate(0) # take up more screen space
    
    tkinter.Button(root,text=message,font=('Times', '24',),command=root.destroy,).pack()
    root.mainloop()
    [code]Code tags[/code] are essential for python code and Makefiles!
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    13
    Rep Power
    0
    First of all, Thanks for your reply.

    What is "system task scheduler"..?

    Also,Can I show the messages using a "messagebox"..?
    What about using the time of the computer's clock (system time) for determinate the time that I want to show up the messages..?
    Is it possible..?
    For example compare the time I want to show up the messages with the system time...Like:
    if 10:00(the system's time) then
    create the appropriate messagebox

    Thanks.
  10. #6
  11. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,851
    Rep Power
    481
    task scheduler

    Sure, use a "messagebox". It's your project.

    Use the time module to get the system time.

    I thought the button useful to indicate message received.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo