//This is simple template of 3D-Coat's script. Script language is very close to c++ and based on angelscript.
//You will usually see it if you used Scripts->Create new script
//Read general syntax description at http://angelcode.com/angelscript/sdk/docs/manual/doc_script.html and
//http://angelcode.com/angelscript/sdk/docs/manual/doc_understanding_as.html
//But if you know c/c++ it will be easy to write scripts. For beginning you may just use only one command 
//cmd("Some UI command");
//With this command you may execute any item in UI. It is easy to get UI item command - hover required comamnd in UI and press MMB and RMB simultaneously. 
//Corresponding command will be copied to clipboard. You may read about other commands in scripting manual.

//declare any global variables if need, don't write commands ritght there, do it in main() of any other function. 
//...

//This function will be called once when script will be run  
//insert any commands there. Start from cmd as described above.
void main(){
	ModalDialog("Just some description there. Click OK to start."," ");
	do{
		Step(1); //Rendering cycle
		ShowFloatingMessage("Please click File->New",1,1); //Show non-modal message
		if(WasRecentlyPressed("$CLEARSCENE",15)){ //Check if New was pressed in last 15 sec
			ModalDialog("Right, thanks!"," ");
			return;
		}
	}while(GetTimeSinceStart()<40);
	ModalDialog("Excuse, I can't wait anymore. Bye!"," ");	
}

//This function is mostly for advanced users. When you are calling or getting some modal message box you are loosing control until user will press some button there. 
//But each time when modal dialog will be show this function will be called and you may do some action inside modal message box   
void ModalDialogCallback(){
	// Example of command - press first button in message box (uncomment next line if need)
	//cmd("$DialogButton#1");/*press OK*/
		
}