|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
package com.example.jmacro.wjdr;
|
|
|
|
|
|
|
|
|
|
import com.example.jmacro.wjdr.base.ViewPoint;
|
|
|
|
|
import com.example.jmacro.wjdr.base.Legend;
|
|
|
|
|
import com.example.jmacro.wjdr.base.ViewRect;
|
|
|
|
|
import com.example.jmacro.wjdr.ui.FXMLUtil;
|
|
|
|
|
import com.example.jmacro.wjdr.util.Logger;
|
|
|
|
@ -70,13 +70,21 @@ public class JMainApplication extends Application {
|
|
|
|
|
JMainService.init(new JMacro() {
|
|
|
|
|
@Override
|
|
|
|
|
public ViewRect focus() {
|
|
|
|
|
return new ViewRect(0, 0, 500, 500);
|
|
|
|
|
return new ViewRect(0, 0, 1920, 1080);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
findLegend(of(0,0,159,168), "电脑", 0.99);
|
|
|
|
|
findLegend(of(100,100,200,200), "电脑2", 0.99);
|
|
|
|
|
ViewRect 电脑 = findLegend(of(0, 0, 159, 168), "电脑", 0.99);
|
|
|
|
|
if (电脑 == null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
mouseLeftDoubleClick(电脑);
|
|
|
|
|
ViewRect 关闭 = waitAndFindLegend(of("关闭"), 0.99, 10);
|
|
|
|
|
if (关闭 == null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
mouseLeftClick(关闭);
|
|
|
|
|
}
|
|
|
|
|
}, new File("legend"));
|
|
|
|
|
}
|
|
|
|
|