public boolean dialog(){
		Font font1 = new Font("Default", Font.PLAIN, 12);
		Font font1small = new Font("DefaultSmall", Font.PLAIN, 12);		
		//creates the dialog
		Dialog = new JFrame("Macro Runner Settings");
		directory = new JTextField("",20);
		macrotorun = new JTextField("",20);
		JLabel labeldir = new JLabel("Directory");
		JLabel labelmacro = new JLabel("Macro");
		JLabel msg = new JLabel("Applys a macro when a new file appears " +
				"in a monitoring directory.");
		msg.setFont(font1small);
		labeldir.setFont(font1small);
		labelmacro.setFont(font1small);
		
		//buttons
		bt_open1 = new JButton("Browse");
		bt_open1.setFont(font1);
		bt_open1.addActionListener(this);
		bt_open2 = new JButton("Browse");
		bt_open2.addActionListener(this);
		bt_open2.setFont(font1);

		bt_ok = new JButton("OK");
		bt_ok.setFont(font1);
		bt_cancel = new JButton("Cancel");
		bt_cancel.setFont(font1);
		bt_ok.addActionListener(this);
		bt_cancel.addActionListener(this);
		
		//dialog panels
		JPanel topp = new JPanel();
		topp.add(msg);
		
		JPanel upperp = new JPanel();
		upperp.setLayout(new FlowLayout(1,5,0));
		upperp.add(labeldir);
		upperp.add(directory);
		upperp.add(bt_open1);
		
		JPanel middlep = new JPanel();
		middlep.setLayout(new FlowLayout(1,5,0));
		middlep.add(labelmacro);
		middlep.add(macrotorun);
		middlep.add(bt_open2);
		
		JPanel lowerp = new JPanel();
		lowerp.setLayout(new FlowLayout(1,5,0));
		lowerp.add(bt_ok);
		lowerp.add(bt_cancel);
		
		JPanel fullp = new JPanel();
		fullp.setLayout(new GridLayout(4,1));
		fullp.add(topp);
		fullp.add(upperp);
		fullp.add(middlep);
		fullp.add(lowerp);
		
		Dialog.getContentPane().add(fullp, BorderLayout.CENTER);
		Dialog.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		Dialog.setSize(400, 200);
		Dialog.setVisible(true);
		
		//do different things depending what has been pushed on dialog
		if (Dialog == null)
			cancelpushed = true;
		
		while( !cancelpushed && !okpushed ) {
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		if (okpushed) {
			//check a last time
			if (!checkMacroFileExists(this.macropath) || !checkDirExists(this.watchpath))  {
				IJ.error("Path assignment failed! Check paths again...");
				//Macro.abort();
			}
			
			return true;
		}
		
		return false;
		
	}