private static void ShowElementRecorder(object sender, EventArgs e, UI.Forms.frmCommandEditor editor) { //get command reference Core.Automation.Commands.UIAutomationCommand cmd = (Core.Automation.Commands.UIAutomationCommand)editor.selectedCommand; //create recorder UI.Forms.Supplemental.frmThickAppElementRecorder newElementRecorder = new UI.Forms.Supplemental.frmThickAppElementRecorder(); newElementRecorder.searchParameters = cmd.v_UIASearchParameters; //show form newElementRecorder.ShowDialog(); ComboBox txtWindowName = (ComboBox)editor.flw_InputVariables.Controls["v_WindowName"]; txtWindowName.Text = newElementRecorder.cboWindowTitle.Text; editor.WindowState = FormWindowState.Normal; editor.BringToFront(); }