How can I get to position and size of a window of the code editor Visual Studio Pro with AppleScript?
This is what I have tried:
tell application "Visual Studio Code" to get the bounds of window 1
--> error "Visual Studio Code got an error: Can’t get bounds of window 1." number -1728 from bounds of window 1
tell application "System Events"
tell process "Visual Studio Code"
position of window 1
size of window 1
end tell
end tell
--> error "System Events got an error: Can’t get process \"Visual Studio Code\"." number -1728 from process "Visual Studio Code"