Note. If the return value is sim.dlgret_still_open, the dialog was not closed and no button was pressed. Otherwise, you should free resources with simEndDialog (the dialog might not be visible anymore, but is still present)
Lua synopsis
int result=sim.getDialogResult(int genericDialogHandle)