Hi everyone.
I’m fairly new to AppleScript, so apologize for any newbie questions. I’m trying to automate a press of a button of a dialog in a certain application. The automation is ran in a virtual machine using vCenter.
The dialog is a native modal. I used “Automator” to generate the script to press it:
tell application "System Events"
click UI Element 5 of group 1 of sheet 1 of window 1 of application process "MyProgram"
end tell
I’m running the script by calling the osascript
command with a filename (myscript.scpt
) from within a Python script. The Python script is executed remotely through the vCenter API if that matters.
I’m getting the following error: “System Events got an error: application isn’t running”. I’m not sure why that happens, because sometimes when I manually run the Python script from the virtual machine, it does work, but remotely it always throws this error.