The get_tile function only works when the dialog is still displayed.
Since your action_tile for "ok_button" and "cancel_button" is "(done_dialog #) then the dialog is dismissed. So your following if statement with get_tile will yield nothing:
(if (= 1 (get_tile "ok_button"))
So before the dialog is dismissed, you can use the get_tile function by including this in the action_tile statement in your ok_button:
(action_tile "ok_button" "(setq input (get_tile \"value_input\"))(done_dialog 1)")
Now when you click the OK button, the get_tile function retrieves the value (string of text) from the edit_box saving to variable input before dismissing the dialog.
Another way to retrieve the value from the edit_box is to include an action_tile statement for "value_input":
(action_tile "value_input" "(setq input $value)")
So when a return or tab is used after the edit_box is filled out the current value (string of text) in the edit_box is retrieved and saved in variable input.
Now one way to use the if statement to test what button was clicked OK or Cancel, you can do this:
(setq what_clicked (start_dialog))
When OK is clicked the (done_dialog 1) will cause what_clicked to store 1
When Cancel is clicked the (done_dialog 0) will cause what_clicked to store 0
Then change your if statement to look like this:
(if (= 1 what_clicked)
(alert (strcat "\nYou clicked OK button & entered into edit box:\n" input))
(alert "You clicked Cancel button")
)
One more thing. You set the edit_box to initially have a value (string of text") of "1" with this statement:
(set_tile "value_input" "1")
I would change this to:
(set_tile "value_input" (setq input "1"))
So this would save the initial variable input to match as "1" which is the string content you're placing into the edit_box when the dialog is displayed.