// One way to use the default Modal Window output
Q = New Window("test", <<Modal, Button Box("OK"), Button Box("Cancel"));
If(Arg(Q[1], 1) == 1,
Print("Okayed"),
Print("Canceled")
);
// But it's easier to use a button script
New Window("test",
<<Modal,
Button Box("OK", Print("Okayed")),
Button Box("Cancel", Print("Canceled"))
);