Each button has it's own return value that you can use to look for in your script: $s = MsgBox(2, "Test", "Test") Select Case $s = 3 MsgBox(0, "", "ABORT") Case $s = 4 MsgBox(0, "", "RETRY") Case $s = 5 MsgBox(0, "", "IGNORE") EndSelect Quick script to show how to use them