faborite music

Hi there is this song that I like so much and I would like it to be played every morning by 8 am. I need help in writing a C++ program that will do that for me. I would appreciate this as it would allow me to learn also.


  • This is most easily achieved with the scheduler features in Windows.

    If you still want to make a program, be aware that this is not exactly a beginner's task. If you have never done Windows API programming, learning how to do so by making this program will be pretty steep. You need to do the following:

    - Find out how to make your program running from PC startup. This is done through some registry settings. If you want your program to register itself, you need to learn how to access the registry with Windows API functions. Less advanced is to simply put your program below "auto run" manually.

    - Find out how to access the Windows clock through the Windows API.

    - Write the program so that it is sleeping most of the time (not consuming CPU power), but checking the clock every minute or so. The Sleep() function is the easiest way to achieve this.

    - Find out how to execute another program from your own program. Again, the Win API: ShellExecute() or CreateProcess. Launch your mp3 player through these functions and pass the file name of the song as command line parameter.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion