Custom Display Window

Hello,

I have a question regarding a custom dialog window. Instead of using the standard Display Dialog, Alert type windows to gather user input I wanted to make my own. I have created the window but I how do I get my script to wait for a button returned from another window.

Example

Tell “window2”
set visible to true
set visible of button “window2button” to true --How do I get the script to wait for the answer from this button. All the button says is “OK”
end tell

Thanks Dallas

Use [url=http://developer.apple.com/documentation/AppleScript/Reference/StudioReference/sr10_panel_suite/sr_panel.html#//apple_ref/doc/uid/20011224-ASKPanelSuite.Commands.Display]display[/url].