Am I correct that the "dialog layout" is used only to specify find criteria?
If so, you can either use set variable steps to set the value of each field to a variable before your script enters find mode or you can use fields with global storage on your dialog layout for the user to enter/select values and then you don't need any variables.
See this thread for examples of scripted finds that get their search criteria from global fields: Scripted Find Examples
yep, dialog is used to specify find criteria. Works fine now.