public void run() {
    _running = true;
    initialFound = true;

    // Looking for the target for the first time
    Debug.log("[Tracker] Looking for the target for the first time");

    match = null;
    while (_running && (match == null)) {
      try {
        match = _screen.exists(_pattern, 0.5);
      } catch (Exception ex) {
      }
    }

    // this means the tracker has been stopped before the pattern is found
    if (match == null) return;

    Debug.log("[Tracker] Pattern is found for the first time");

    anchor.setLocation(match.x, match.y);
    anchor.setSize(match.w, match.h);
    SklAnimationFactory.createFadeinAnimation(anchor).start();

    try {
      _screen.click(match, 0);
    } catch (FindFailed e) {
    }

    if (transitionListener != null) transitionListener.transitionOccurred(this);
  }
예제 #2
0
 private void txtHotkeyKeyPressed(KeyEvent e) {
   int code = e.getKeyCode();
   int mod = e.getModifiers();
   Debug.log(7, "" + code + " " + mod);
   setTxtHotkey(code, mod);
   _txtHotkey.setEditable(false);
 }
예제 #3
0
 public void testEnded(String testName) {
   Debug.log(8, "test ended: " + testName);
   synchUI();
   SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           if (fTestResult != null) {
             fCounterPanel.setRunValue(fTestResult.runCount());
             fProgressIndicator.step(fTestResult.runCount(), fTestResult.wasSuccessful());
           }
         }
       });
 }
예제 #4
0
 public void testStarted(String testName) {
   Debug.log(8, "test started: " + testName);
 }