You can import a ready-made example from here: https://eu.eyeauras.net/share/S20240224000701ZxH9BwnuQbRX
F1.
var sendInputApi = GetService<ISendInputUnstableScriptingApi>(); // to get cursor coordinates
var overlayApi = GetService<IOnScreenCanvasScriptingApi>(); // for overlay rendering
var canvas = overlayApi.Create() // create a canvas for overlay rendering
.AddTo(ExecutionAnchors); // specify to clear the canvas when the script finishes
var rectangle = canvas
.AddRectangle() // add a rectangle
.WithBorderColor(Color.Azure) // color
.WithBorderThickness(1) // border thickness
.WithSize(new Size(32, 32)); // size
Log.Info("Starting tracking");
// Important! Not while(true), but in this form
// This code will run in a loop until the script is stopped
// It will stop either when the EyeAuras window becomes active or by a hotkey
while (!cancellationToken.IsCancellationRequested){
// get cursor coordinates and specify that the overlay should be near
rectangle.Location = sendInputApi.CursorPosition;
}
// This is where we will end up when the script is commanded to stop
Log.Info("Completed tracking");
Naturally, the overlay can render not only squares. It can be anything - text, image, even video.