I know this function, VladikAllods mentioned it and told me to use it. But when i tried i got an error that he doesnt know this function. So i looked it up in the API and it was there. Yesterday i found out, that this has been added in 17.1 and we are playing on 16.3. So its working for your game version fine, but not for ours.
But i have just tested it and the box got opened automatically. Finally! Thanks for you help!