Possible to differentiate between clicking OK button and clicking closing window?

Everything OAD-related that won't fit in the other categories: share general aspects of macro programming and discuss the OAD environment
Post Reply
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Possible to differentiate between clicking OK button and clicking closing window?

Post by user-6033 »

Hi,
I just wonder if there is a convenient way to separate the action clicking OK button from the action closing the window in a simple Zen message box where you only have the OK button? The window will return None in both cases and I would prefer that the closing of the window would result in an abortion of the script.

Kind regards
Fredrik Olsson
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

if there is a convenient way to separate the action clicking OK button from the action closing the window in a simple Zen message box
not directly, but there is a workaround:

Code: Select all

click = Zen.Windows.ShowTextBox("Question","Continue with Ok, else exit")
print click
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Post by user-6033 »

Thank you! I will use that method instead!

Best regards
Fredrik Olsson
Post Reply