@Anke – what version of InDesign?
CS6 and above:
CS6, sorry, forgot to mention that! :) I tried this before as well, but it's not working. "object doesn't support preference or method mainMonitorPpi" It is a startup script, could that cause this problem?
Did you test this line of code from the ESTK ?
It should work with CS6 and above. Just tested on my MacBook Pro (no second monitor installed).
In context of a startup script I could not tell.
I think you should post some code here to test a snippet…