Ejemplo n.º 1
0
        public static string GetColour(Point point)
        {
            AutoHotkey.ExecSimple(string.Format("PixelGetColor, color, {0},  {1} ", point.X, point.Y));
            string ret = AutoHotkey.GetVar("color");

            return(ret);
        }
Ejemplo n.º 2
0
 public static void MouseDrag(Point p1, Point p2)
 {
     BeginMouseDrag(p1);
     AutoHotkey.ExecSimple(string.Format("mousemove {0}, {1}, 50 ", p2.X, p2.Y));
     AutoHotkey.ExecSimple("sleep 1000 ");
     AutoHotkey.ExecSimple("click up ");
 }
Ejemplo n.º 3
0
 public static void ContinueDrag(params Point[] points)
 {
     foreach (Point p in points)
     {
         AutoHotkey.ExecSimple(string.Format("mousemove {0}, {1}, 2 ", p.X, p.Y));
     }
 }
Ejemplo n.º 4
0
 public static void BeginMouseDrag(Point p1, params Point[] points)
 {
     AutoHotkey.ExecSimple(string.Format("mousemove {0}, {1} ", p1.X, p1.Y));
     AutoHotkey.ExecSimple("sleep 50 ");
     AutoHotkey.ExecSimple("click down ");
     AutoHotkey.ExecSimple("sleep 50 ");
     ContinueDrag(points);
 }
 internal override void Execute(StreamWriter fs)
 {
     //WinWait, BlueStacks App Player,
     //IfWinNotActive, BlueStacks App Player, , WinActivate, BlueStacks App Player,
     //WinWaitActive, BlueStacks App Player,
     AutoHotkey.ExecSimple(@"WinWait, BlueStacks App Player, ");
     AutoHotkey.ExecSimple(@"IfWinNotActive, BlueStacks App Player, , WinActivate, BlueStacks App Player, ");
     AutoHotkey.ExecSimple(@"WinWaitActive, BlueStacks App Player, ");
 }
Ejemplo n.º 6
0
        public static Point ImageSearch(string image, int intensityVariation, Point p1, Point p2)
        {
            AutoHotkey.SetVar("OutputVarX", "0");
            AutoHotkey.SetVar("OutputVarY", "0");
            AutoHotkey.ExecSimple(
                string.Format("ImageSearch OutputVarX, OutputVarY, {0}, {1}, {2}, {3}, *{4} {5} ",
                              p1.X, p1.Y, p2.X, p2.Y, intensityVariation, image));
            int erroLevel = -1;

            int.TryParse(AutoHotkey.GetVar("ErrorLevel"), out erroLevel);
            if (erroLevel == 1)
            {
                return(Point.Error);
            }
            else
            {
                return(new Point(int.Parse(AutoHotkey.GetVar("OutputVarX")), int.Parse(AutoHotkey.GetVar("OutputVarY"))));
            }
        }
Ejemplo n.º 7
0
 public static void EndDrag()
 {
     AutoHotkey.ExecSimple("click up ");
 }
Ejemplo n.º 8
0
 public static void Send(string actionStr)
 {
     AutoHotkey.ExecSimple("Send " + actionStr);
 }
Ejemplo n.º 9
0
 public static void Sleep(int milSec)
 {
     AutoHotkey.ExecSimple(string.Format("sleep {0} ", milSec));
 }
Ejemplo n.º 10
0
 public static void MouseClick(Point p)
 {
     AutoHotkey.ExecSimple(string.Format("mousemove {0}, {1} ", p.X, p.Y));
     AutoHotkey.ExecSimple("sleep 100 ");
     AutoHotkey.ExecSimple(string.Format("click {0}, {1} ", p.X, p.Y));
 }