Pop ups

Blitz3D Forums/Blitz3D Beginners Area/Pop ups

here's the C# code for a time based program launcher... it runs silently in the background (you'll have to have an installer add it to the startup processes for users)

using System; // easyer to access time and stuff

// main class
class Program {
	
	//CHANGABLE --------
	const string executetime = "3:22 PM"; // place wanted time here
	const string exepath = "mspaint.exe"; //place wanted exe path here
	//---------
	
	// main program
	public static void Main(){
		
		bool notdisabled = true;//to prevent mass spawning
		string dt;// current time holder
		
		
		// infinite loop
		while(1 < 2){
			dt = DateTime.Now.ToString("t"); // get time
			
			// if its not the right time
			// and the mass spawning preventer is on
			// set the mass spawning prevent off
			if(dt != executetime && notdisabled == false){
				notdisabled = true;
			}// end if
	
			//if the current time equals the set time and
			//the mass spawning preventer is ok
			//run the picked application
			if(dt == executetime && notdisabled){
				System.Diagnostics.Process.Start(exepath);
				notdisabled = false;
			}//end if
			

		}// wend
		
	}// end
	
} // end class