Hi @Seabra - you can use the two functions MOUSEX() and MOUSEY() to get the position of the mouse pointer on the screen. From there you can then decide whether those coordinates mean “North”, “South” etc. And perform whatever actions you wish.
Hello Tiffle! Thanks again!
Ive tried to use this functions, I got the right position etc but I don't know how can I make the macro understand that it is in north south east west. Ill keep trying thanks so much!
Thanks so much hello, it was a really good start! I still couldn't make the macro recognise where is the position, north, south, east, west but ill keep trying.
Thanks to all for your valuable help. I would like to have a solution without the help of user interactions (with the mouse), but probably this is not possible. There is the Window API getScreenDatails that could possibly do this, but it is not implemented in Safari yet and there is no info if it will ever be implemented.
With User-Interactions I had also helped myself so far to realize a solution, because I get the ScreenBounds of all connected screens (ordered by screen index) with the help of the KeyboardMaestro SCREEN() function. Then, of course, I can use onmouseenter (bound to the element, for example) to get the position event.screenX and event.screenY and only need to compare this with the ScreenBounds to get the index of the screen on which the Custom HTML Prompt window is displayed.
This also works regardless of the screen arrangement.
Why I don't like the need for user interaction with the mouse so much is because I like to know early on when the user is going to move the Custom HTML Prompt to another screen, i.e. the mouse query needs to happen then too. Of course, this can also be achieved with the mousemove-event. But so far I didn't want to load the CPU with that.