I have an applescript dialog for InDesign CS6 that returns values entered into three text fields. Here's the relevant snippet
set userResponse to show myDialog
if userResponse is true then
set docWidth to edit contents of myWidth as string
set docHeight to edit contents of myHeight as string
set docBleed to edit contents of myBleed as string
destroy myDialog
else
destroy myDialog
error number -128
end if
I want to add the following logic and prevent the user from entering in values larger than 2160. I just want this dialog to display and then return to the previous dialog so they can correct the error:
if 2160 < docWidth or docHeight then
beep 1
display alert "Document cannot be larger than 2160 inches in either dimension." buttons ["Try again"] default button 1
end if
I can't find a way to insert this into the previous dialog without destroying it. Any ideas?