public int CloseWindow(String windowName) { if (String.IsNullOrEmpty(windowName)) { String[] windowList = null; Generic generic = new Generic(this.utils); try { windowList = generic.GetWindowList(); foreach (String window in windowList) { ArrayList menuList = new ArrayList(); try { if (utils.InternalGuiExist(window, "mnuSystem") == 1) { generic.GrabFocus(window); InternalMenuHandler(window, "mnuSystem;mnuClose", ref menuList, "Window"); } } catch (Exception ex) { LogMessage(ex); } finally { menuList = null; } } return 1; } finally { generic = null; windowList = null; } } else { ArrayList menuList = new ArrayList(); try { return InternalMenuHandler(windowName, "mnuSystem;mnuClose", ref menuList, "Window"); } finally { menuList = null; } } }
public string[] GetChild(String windowName, String childName = null, string role = null, string parentName = null) { Generic generic = new Generic(this); try { return generic.GetChild(windowName, childName, role, parentName); } finally { generic = null; } }
public string[] GetObjectNameAtCoords(int waitTime = 0) { Generic generic = new Generic(this); try { return generic.GetObjectNameAtCoords(waitTime); } finally { generic = null; } }
public string GetObjectProperty(String windowName, String objName, string property) { Generic generic = new Generic(this); try { return generic.GetObjectProperty(windowName, objName, property); } finally { generic = null; } }
public string[] GetObjectInfo(String windowName, String objName) { Generic generic = new Generic(this); try { return generic.GetObjectInfo(windowName, objName); } finally { generic = null; } }
public int[] GetWindowSize(String windowName) { Generic generic = new Generic(this); try { return generic.GetWindowSize(windowName); } finally { generic = null; } }
public int SimulateMouseMove(int source_x, int source_y, int dest_x, int dest_y, double delay = 0.0) { int[] size; Generic generic = new Generic(utils); try { size = generic.GetWindowSize("paneProgramManager"); } finally { generic = null; } if (source_x < size[0] || source_y <size[1] || dest_x> size[2] || dest_y > size[3] || source_x > size[2] || source_y > size[3] || dest_x < size[0] || dest_y < size[1]) { return(0); } bool x_flag = true; // Iterated x ? bool y_flag = true; // Iterated y ? while (true) { if (x_flag) { if (source_x > dest_x) { // If source X greather than dest X // then move -1 pixel source_x -= 1; } else if (source_x < dest_x) { // If source X less than dest X // then move +1 pixel source_x += 1; } else { // If source X equal to dest X // then don't process X co-ordinate x_flag = false; } } if (y_flag) { if (source_y > dest_y) { // If source Y greather than dest Y // then move -1 pixel source_y -= 1; } else if (source_y < dest_y) { // If source Y less than dest Y // then move +1 pixel source_y += 1; } else { // If source Y equal to dest Y // then don't process Y co-ordinate y_flag = false; } } if (delay != 0.0) { utils.InternalWait(delay); } // Start mouse move from source_x, source_y to dest_x, dest_y GenerateMouseEvent(source_x, source_y, "abs"); if (source_x == dest_x && source_y == dest_y) { // If we have reached the dest_x and dest_y // then break the loop break; } } return(1); }
public int Click(String windowName, String objName) { Generic generic = new Generic(this); try { return generic.Click(windowName, objName); } finally { generic = null; } }
public int HasState(String windowName, String objName, String state, int guiTimeOut = 0) { Generic generic = new Generic(this); try { return generic.HasState(windowName, objName, state, guiTimeOut); } finally { generic = null; } }
public int ObjectExist(String windowName, String objName) { Generic generic = new Generic(this); try { return generic.ObjectExist(windowName, objName); } finally { generic = null; } }
public int GrabFocus(String windowName, String objName = null) { Generic generic = new Generic(this); try { return generic.GrabFocus(windowName, objName); } finally { generic = null; } }
public String[] GetWindowList() { Generic generic = new Generic(this); try { return generic.GetWindowList(); } finally { generic = null; } }
public int SimulateMouseMove(int source_x, int source_y, int dest_x, int dest_y, double delay = 0.0) { int[] size; Generic generic = new Generic(utils); try { size = generic.GetWindowSize("paneProgramManager"); } finally { generic = null; } if (source_x < size[0] || source_y < size[1] || dest_x > size[2] || dest_y > size[3] || source_x > size[2] || source_y > size[3] || dest_x < size[0] || dest_y < size[1]) return 0; bool x_flag = true; // Iterated x ? bool y_flag = true; // Iterated y ? while (true) { if (x_flag) { if (source_x > dest_x) { // If source X greather than dest X // then move -1 pixel source_x -= 1; } else if (source_x < dest_x) { // If source X less than dest X // then move +1 pixel source_x += 1; } else { // If source X equal to dest X // then don't process X co-ordinate x_flag = false; } } if (y_flag) { if (source_y > dest_y) { // If source Y greather than dest Y // then move -1 pixel source_y -= 1; } else if (source_y < dest_y) { // If source Y less than dest Y // then move +1 pixel source_y += 1; } else { // If source Y equal to dest Y // then don't process Y co-ordinate y_flag = false; } } if (delay != 0.0) utils.InternalWait(delay); // Start mouse move from source_x, source_y to dest_x, dest_y GenerateMouseEvent(source_x, source_y, "abs"); if (source_x == dest_x && source_y == dest_y) { // If we have reached the dest_x and dest_y // then break the loop break; } } return 1; }
public int ActivateWindow(String windowName) { Generic generic = new Generic(this); try { return generic.GrabFocus(windowName); } finally { generic = null; } }
public string[] GetAppList() { Generic generic = new Generic(this); try { return generic.GetAppList(); } finally { generic = null; } }
public int StateEnabled(String windowName, String objName) { Generic generic = new Generic(this); try { return generic.StateEnabled(windowName, objName); } finally { generic = null; } }
public string[] GetAllStates(String windowName, String objName) { Generic generic = new Generic(this); try { return generic.GetAllStates(windowName, objName); } finally { generic = null; } }
public String[] GetObjectList(String windowName) { Generic generic = new Generic(this); try { return generic.GetObjectList(windowName); } finally { generic = null; } }
public String GetAccessKey(String windowName, String objName) { Generic generic = new Generic(this); try { return generic.GetAccessKey(windowName, objName); } finally { generic = null; } }