well, it's ugly...but...it works.  if the coin button (Joy1) is held down for more than 5 seconds, it kills mame, then my batch file finished running..shutting down windows.
I could of course just change the batch file to not shut down windows and instead set the script to
run, shutdown -s -t 00
but..whatever
~Numpad1:: 
tt=0 ; set time to 0 
loop,10000 ; check every 30 ms 
{ 
      GetKeyState, state , Numpad1, p  
   if state=U 
       Break    
   tt+=30 
   sleep 30 
} 
if tt>5000  ; if key pressed more than 5 secs
{
	Run, taskkill /IM mame.exe   
sleep 2000
}
Tooltip
return