thiago costa

thiago costa

  • NA
  • 319
  • 0

How to use timer to do different things each X amount of minutes/seconds from the start, till it's over

Nov 30 2011 12:02 AM
Hello there guys, I am making a guide for starcraft 2 players, and it will require me to use a timmer...

This is how I need it:

1) Activate timer by pressing SHIFT + P (This is how I am using my hotkey if it matters (LINK HERE)

2)Timer started at ZERO, now it will go for ever until user wants to stop it.

3)After 30 seconds the timer is on, I want to execute this:
axWindowsMediaPlayer1.currentPlaylist = axWindowsMediaPlayer1.mediaCollection.getByName("mediafile");
            axWindowsMediaPlayer1.URL = "zerg1.mp3";
            axWindowsMediaPlayer1.Ctlcontrols.play();

4)After 68 seconds, I want to execute this:
axWindowsMediaPlayer1.currentPlaylist = axWindowsMediaPlayer1.mediaCollection.getByName("mediafile");
            axWindowsMediaPlayer1.URL = "zerg2.mp3";
            axWindowsMediaPlayer1.Ctlcontrols.play();

and so on, ... untill the player deactivates the timer,...

How can I acomplish this ? 
I was gonna make a LARGE mp3 file, for each strategy method, but then my program will be 600 MB...
I wish to create tiny mp3 files (spoken instructions) so that each time the timmer hits my desired seconds, it will execute that tiny mp3 file through media player..

Media player is already on my program (using WMPLib;), it works and all ...

I just need the timer to start from Zero each time the person uses the global hotkey (which I believe my hotkey is fully working already)

Thanks guys !!! 




Answers (6)