dialog dialogbox {
title "New dialogbox for u"
;title of dialogbox
size -1 -1 120 50
;size of dialog box
option dbu

edit "Type Text here...", 21, 20 12 69 10
;this is how a edit box looks when its enabled ready for you to type
edit "This is a disabled version", 22, 20 22 69 10, disabled
;this is how a edit box looks when disabled
button "Ok", 29, 24 34 27 9, OK
;create an ok button
button "Cancel", 30, 60 34 27 9, Cancel
;create a cancel button
}

on *:DIALOG:dialogbox:sclick:29: { echo -a Congrat's you've made the button ok perform a command }
; basically here on this script your opening a new script on dialog.. the name of your dialog is dialogbox
; you want a sclick event because your gonna be clicking on the button and we need to assign it its id
; Notice how it says button "Ok", 29, 24 34 27 9, OK we assigned it ID 29 so now
; When the button ok is pressed it will echo back to you Congrat's you've made the button ok perform a command

; Heres a simple script that when you enter something in the dialog box it will display lets assign it to the cancel button


On *:dialog:dialogbox:sclick:30: { echo -a Congrat's you've typed $did($dname,21).text in the editbox }
}
; What we basically did here is take the cancel button which is item 30 and have it echo'd when pressed
; What it echos is whatever is typed in the editbox thats enabled which is item 21
; so we used the script command $did($dname,21).text to display the text

here you go have fun