public void actionPerformed(ActionEvent e) {
		if (e.getSource() == bt_open1) {
			//Do something
			//IJ.log("pushed open1");
			this.watchpath = IJ.getDirectory(""); ;
			setWatchpath(this.watchpath);
			directory.setText(this.watchpath);
		}
		if (e.getSource() == bt_open2) {
			//Do something
			//IJ.log("pushed open1");
			OpenDialog od = new OpenDialog("Choose a .mrc file", null); 
			this.macropath =  od.getDirectory() + od.getFileName();
			this.macrotext = IJ.openAsString(this.macropath);
			//this.watchpath =
			macrotorun.setText(this.macropath);
		}
		if (e.getSource() == bt_ok) {
			//Do something
			//IJ.log("pushed Ok");
			//check for folder and macropath
			if (!checkMacroFileExists(macropath)) {
				IJ.log("No such macro file: " + this.macropath);
			}
			if (!checkDirExists(watchpath)){
				IJ.log("No such directory to watch: " + this.watchpath);			
			}
			if (checkMacroFileExists(macropath) && checkDirExists(watchpath)) {
				Dialog.dispose();
				Dialog = null;
				okpushed = true;
			}
				
		}
		if (e.getSource() == bt_cancel) {
			//Do something
			//IJ.log("pushed cancel");
			cancelpushed = true;
			Dialog.dispose();
			Dialog = null;
			//Macro.abort();
		}
		
	}