This is a correctly-asked version of a question that I asked with incorrect information a few days ago:
Some time ago, I wrote a script that expands a window to the same size as the display, sets the “Application UI Presentation Mode” to 4 to hide the menu bar and dock, and tells the window to move to position {0,0}.
tell application "System Events"
repeat until (process "MyApp" exists)
delay 0.1
end repeat
tell process "Myapp"
repeat until window 1 exists
delay 0.1
end repeat
end tell
delay 0.7
tell process "MyApp"
tell window 1
set position to {0, 0}
end tell
end tell
end tell
Of course this requires that GUI scripting be enabled - and I have enabled it in Yosemite for this script application. This script has worked perfectly in Snow Leopard, Lion, Mountain Lion, and Mavericks (with minor tweaks for each new OS version).
Under Yosemite, the command to set position to {0, 0} actually sets it to position {0, 22} or something similar - below the position of the menu bar- even though the menu bar is not visible. Instead, the desktop background is visible in a band 21 pixels high, all across the screen.
Is it possible in Yosemite to move a window to position {0. 0} as it was before?