Please note that this is in the editor, needs to be able to run on mac and windows, and must work on multi monitor displays. You are encouraged to solve this task according to the task description, using any. If neither of these questions have answers, does anyone have any ideas for me to accomplish this problem a different way? Maybe finding the location of the button or mouse cursor isn't the way to solve this. Get the current location of the mouse cursor relative to the active window. Look into your AutoHotkey installation folder and run AU3spy.exe. Control source ( Control )sender // Obtain screen location of drag event. It can be implemented using the clientX and clientY methods of the event: event. This function returns a tuple of the position of the mouses cursor. Determine where the Mouse Cursor Is private void formsPlot1MouseMoved(object sender, MouseEventArgs e) (double x, double y) formsPlot1.GetMouseCoordinates. My question is, how can I either get the mouse position or the button position in absolute coordinates ( not relative to the guilayout ) so that I can open the editor window at the location of the button I clicked. operation I assume that the sender parameter you are receiving is one. So, the task is to find the coordinates of the mouse over the screen. To determine the mouses current position, we use the statement, pyautogui.position(). So, similar to GetLastRect, if I'm inside of a beginhorizontal or two, then the mouse position isn't even going to be relative to my current editor window. As far as I know the gives me the mouse position relative to the editor window I'm in and also relative to the guilayout. I have a button in an editor window, and when I click the button, I'd like to open a new editor window on top of that at the position of the button I clicked on.
0 Comments
Leave a Reply. |