Parameters
- windowName
Type: System.String
The header of the window.
- x
Type: System.Int32
The x coordinate relative to the window.
- y
Type: System.Int32
The y coordinate relative to the window.
- topMost
Type: System.Boolean
true if need to show the window on top of all; otherwise, false. Default value is false.
Return Value
Type: System.String
The answer with information about the success of the current command's execution. If current command was successful then this answer is "ok"; otherwise message describing the error.
C# | ![]() |
---|---|
// random Random rnd = new Random(); // x location int x = 200; // y location int y = 200; // offset X int offsetX = rnd.Next(100); // offset y int offsetY = rnd.Next(100); // move mouse to start location x = 200 and y = 200 on "Window" window string result = Emulator.MouseMove("Window", x, y); // check result if (result != "ok" && Emulator.ErrorDetected) return "Fail"; // mouse move to a new location result = Emulator.MouseMove("Window", x + offsetX, y + offsetY); // check result if (result != "ok" && Emulator.ErrorDetected) return "Fail"; // answer return String.Format("Mouse was moved from x = {0}; y = {1} to x = {2}; y = {3}", x, y, x + offsetX, y + offsetY); |
PHP | ![]() |
---|---|
// random $rnd = new Random(); // x location $x = 200; // y location $y = 200; // offset X $offsetX = $rnd->Next(100); // offset y $offsetY = $rnd->Next(100); // move mouse to start location x = 200 and y = 200 on "Window" window $result = ZennoLab\Emulation\Emulator::MouseMove("Window", $x, $y); // check result if ($result != "ok" && ZennoLab\Emulation\Emulator::ErrorDetected) return "Fail"; // mouse move to a new location $result = ZennoLab\Emulation\Emulator::MouseMove("Window", $x + $offsetX, $y + $offsetY); // check result if ($result != "ok" && ZennoLab\Emulation\Emulator::ErrorDetected) return "Fail"; // answer return String::Format("Mouse was moved from x = {0}; y = {1} to x = {2}; y = {3}", $x, $y, $x + $offsetX, $y + $offsetY); |