Search in sources :

Example 1 with Location

use of org.sikuli.script.Location in project sakuli by ConSol.

the class RegionImpl method rightClickMe.

/**
 * {@link Region#rightClick()} ()}
 */
public RegionImpl rightClickMe() {
    int ret;
    try {
        Location center = this.getCenter();
        ret = this.rightClick(center);
    } catch (FindFailed findFailed) {
        ret = 0;
    }
    loader.loadSettingDefaults();
    if (ret != 1) {
        loader.getExceptionHandler().handleException("Couldn't right click on region " + this, this, resumeOnException);
        return null;
    }
    return this;
}
Also used : FindFailed(org.sikuli.script.FindFailed) Location(org.sikuli.script.Location)

Example 2 with Location

use of org.sikuli.script.Location in project sakuli by ConSol.

the class RegionImpl method doubleClickMe.

/**
 * {@link Region#doubleClick()} ()}
 */
public RegionImpl doubleClickMe() {
    int ret;
    try {
        Location center = this.getCenter();
        ret = this.doubleClick(center);
    } catch (FindFailed findFailed) {
        ret = 0;
    }
    loader.loadSettingDefaults();
    if (ret != 1) {
        loader.getExceptionHandler().handleException("Couldn't double click on region " + this, this, resumeOnException);
        return null;
    }
    return this;
}
Also used : FindFailed(org.sikuli.script.FindFailed) Location(org.sikuli.script.Location)

Example 3 with Location

use of org.sikuli.script.Location in project sakuli by ConSol.

the class RegionImpl method clickMe.

/**
 * {@link org.sakuli.actions.screenbased.Region#click()}
 */
public RegionImpl clickMe() {
    int ret;
    try {
        Location center = this.getCenter();
        ret = this.click(center);
    } catch (FindFailed findFailed) {
        ret = 0;
    }
    loader.loadSettingDefaults();
    if (ret != 1) {
        loader.getExceptionHandler().handleException("Couldn't click on region " + this, this, resumeOnException);
        return null;
    }
    return this;
}
Also used : FindFailed(org.sikuli.script.FindFailed) Location(org.sikuli.script.Location)

Example 4 with Location

use of org.sikuli.script.Location in project sakuli by ConSol.

the class RegionImpl method mouseMoveMe.

/**
 * wrapper implementation for {@link #mouseMove(Object)} ()}
 */
public RegionImpl mouseMoveMe() {
    int ret;
    try {
        Location center = this.getCenter();
        ret = this.mouseMove(center);
    } catch (FindFailed findFailed) {
        ret = 0;
    }
    loader.loadSettingDefaults();
    if (ret != 1) {
        loader.getExceptionHandler().handleException("Could not move the mouse on region " + this, this, resumeOnException);
        return null;
    }
    return this;
}
Also used : FindFailed(org.sikuli.script.FindFailed) Location(org.sikuli.script.Location)

Aggregations

FindFailed (org.sikuli.script.FindFailed)4 Location (org.sikuli.script.Location)4