InputHandler inputHandler = view.getInputHandler(); int repeatCount = inputHandler.getRepeatCount(); inputHandler.setRepeatEnabled(false); inputHandler.setRepeatCount(1);  for(int i = repeatCount - 1; i >= 0; i--) { Macros.playMacro(view,macro.path); }
Macros.playMacro(view,macro.path);
	public void actionPerformed(ActionEvent evt)	{		View view = getView(evt);		String macroName = evt.getActionCommand();		Macros.Macro macro = Macros.getMacro(macroName);		if(macro == null)		{			String[] args = { macroName };			GUIUtilities.error(view,"macro-not-found",args);			return;		}		// This hackery is necessary to prevent actions inside the		// macro from picking up the repeat count		InputHandler inputHandler = view.getInputHandler();		int repeatCount = inputHandler.getRepeatCount();		inputHandler.setRepeatEnabled(false);		inputHandler.setRepeatCount(1);		for(int i = repeatCount - 1; i >= 0; i--)		{			Macros.playMacro(view,macro.path);		}	}