I am looking for ways to perform click upon the virtual desktop, that I launch from the MacOS environment. So specifically, any script or tool should come in handy, but I am new to GUI automation topic. What is the best way to approach that task? Say during the day it is necessary to repeatedly perform this click with some 20 min interval.
Asked
Active
Viewed 58 times
0
-
Give python a try. – Xenobiologist Mar 10 '20 at 12:20
-
Any recommendations on libs to use?Thnx – Ian Kuzin Mar 10 '20 at 12:23
-
What is it that you want to do? Just mouse-clicks? Any other interactions? Check whether a window exists? – Xenobiologist Mar 10 '20 at 12:27
-
Ideally, I want it to check if Citrix session is still valid, and if it is - perform a click on any region within Citrix Window, and click on it every 20 mins. – Ian Kuzin Mar 10 '20 at 12:33
-
Could you check if the process is running? If the window exists? Is it enough to move the move one pixel left and then one pixel right every 15 min? – Xenobiologist Mar 10 '20 at 13:12
-
It should be sufficient to do that way. I encountered the situation I tried to solve with automator macos tool that caused system hangouts every hour, guessing bc of the short delay between actions. So I guess the best way is to check If Window Exists... – Ian Kuzin Mar 10 '20 at 15:18
-
Does this code work? I do not have a VM with MacOs at the moment: https://stackoverflow.com/questions/53237278/obtain-list-of-all-window-titles-on-macos-from-a-python-script – Xenobiologist Mar 11 '20 at 11:27
-
@Xenobiologist code returns result in such format "Citrix Viewer:
". So it seems that it was able to detect what applications were active. And this particular Citrix Viewer's window in my case has its own name, which seems to be ignored. – Ian Kuzin Mar 13 '20 at 13:58 -
I gave it a go and run this code here (https://stackoverflow.com/questions/281133/how-to-control-the-mouse-in-mac-using-python) and it worked. If someone could explain to me how to wrap it in a loop. Because now it clicks only one time instead I want to have a 20 seconds delay. – Ian Kuzin Mar 13 '20 at 15:01