Reposition an Unscriptable Application Window


I’m having a bit of trouble trying to reposition my Diablo II window when I switch to windowed mode. I want to position it at the top-left corner {0,0}.

Any help is much appreciated.

On a side note, is there a way to skip the intro on the Mac version automatically? On my PC, I just add the -skiptobnet option and it’ll bypass all the cinematics in the beginning.


Ok, I can reposition the window using Prefab or Apple’s UI Inspector, but when I try to do it with AS, I get a “System Events got an error: NSInternalScriptError”.

I’ve tried it a thousand different ways, and can’t get past that error. I can do everything with the window’s position, except change it. Am I referencing the window incorrectly or something?

Here’s my code:

tell application "Diablo II (Carbon)" to activate
-- may not need to activate application

tell application "System Events"
	if (system attribute "sysv") < 4144 or UI elements enabled then
		tell application process "Diablo II (Carbon)"
			set TEST to position of window 1
			display dialog TEST as string  -- I can see the coords just fine...
			set position of window 1 to {150, 150} -- But I can't change them?
		end tell
		tell application "System Preferences"
			set current pane to pane ""
			display dialog "GUI Scripting is not enabled." & return & return & "Check "Enable access for assistive devices" in the Universal Access preference pane (authentication is required), then run this script again." with icon stop buttons {"OK"} default button "OK"
		end tell
	end if
end tell