Option Explicit'********DO NOT remove or change the expand line or the included file contents******************'  MachStdMIll license terms REQUIRE that the copyright and License terms remain a part of this source file#expand <Masters\Headers\CopyRightAndLicenseNotice>	'**************************************************************************************' this is a template script for M6ATC.m1s' This template is installed by MSM into <mach install dir>\MachStdMill\Profile Macro Masters\Templates'' the Auto Tool Changer implementer should flesh this template out with appropriate code.' this script is called from MSMM6start for AutoTC mode' the script will be looked for by M6Start in the macro dir for the current profile'  i.e. in "<mach install dir>\Macros\<GetActiveProfileName() >\"    and the name of the script in that dir must be "M6ATC"'' this script is responsible for physically putting GetSelectedTool() into the spindle ' this script should returns when the tool mount is complete '' the routine should do all TC operations in G53 coordinates' Routine is entered with G90 G00 G40' entry point into the script      	Dim newtool As Integer  	Dim oldtool As Integer  	Dim NewtoolDro As Integer   	  	  	oldtool = Getoemdro (1824)	newtool = GetSelectedTool()	setoemdro(2000,newtool)  	           	 While Not IsActive(Input4)  		'Hope this Put a delay On running script so the tool change has time to complete	    	 sleep 100 	          Wend                                              'MsgBox ("newtool = " & GetSelectedTool)  'MsgBox ("oldtool = " & oldtool )  'MsgBox ("dro 2000 = " & getoemdro (2000) )        Exit Sub            