The following code opens and closes the dialog almost at the same time. So there is no time to click OK or Close or interact with the dialog in any kind.
<html>
<a class="btn btn-primary" href="#" onclick="myFunction()">
Click here
</a>
</html>
<script>
function myFunction() {
vex.defaultOptions.className = 'vex-theme-flat-attack'
vex.dialog.alert('Thanks for checking out vex!')
}
</script>