一半君的总结纸

听话只听一半君

#29 How can I get Maya to execute a command as soon as a window is closed?

The ‘scriptJob’ command has a flag for this purpose:

window -title "Close Me" myWindow;
showWindow myWindow;

// Use a scriptJob to pop up a farewell message when the window is closed
scriptJob -uiDeleted myWindow "confirmDialog -message \"Buh-bye!\"";

The scriptJob is automatically deleted with its associated UI.

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: