I am making a change to a script someone else built for me.
Part of it was used to create a file in InDesign with specific width and height based on info the user typed in.
I am being asked to use the math inside the old script, and make a new script which only displays the width and height returned from the math. HELP
How do I get it to display the result?
tell application "Finder"
activate
set numPages to text returned of (display dialog "Enter number of pages:" default answer 100) as number
if (numPages mod 4) is not equal to 0 then
error "The number of pages must be divisible by 4."
else if (numPages is less than 4) or (numPages is greater than 532) then
error "The number of pages must be between 4 and 532."
else if (numPages is less than 44) then
set bindingType to "Saddle Stitch"
else if (numPages is greater than 40) and (numPages is less than 84) then
set bindingType to button returned of (display dialog "Please choose a binding type:" buttons {"Saddle Stitch", "Perfect Binding"})
else if (numPages is greater than 80) then
set bindingType to "Perfect Binding"
end if
set pageWidth to text returned of (display dialog "Enter page width in inches:" default answer 8.375) as number
set pageHeight to text returned of (display dialog "Enter page height in inches:" default answer 10.875) as number
set pageweight to text returned of (display dialog "Enter paper weight of text pages in decimal." & return & "Standard text (50# Williamsburg)= .0039" & return & "Gusto 70# Satin = .0035" & return & "Gusto 70# Gloss = .0032" default answer 0.0039) as number
if bindingType is "Perfect Binding" then
set spineSize to (((numPages / 2) * pageweight) + 0.031)
set coverWidth to (spineSize + (pageWidth * 2))
set frameT to 0.5
set frameL to (coverWidth / 2) - (spineSize / 2)
set frameB to pageHeight - 0.5
set frameR to frameL + spineSize
if numPages is greater than 80 then
set basePointSize to 40
set minPointSize to 10
set maxPointSize to 40
set pointsize to ((basePointSize * spineSize) / 2) * 2
if pointsize is less than minPointSize then
set pointsize to minPointSize
else if pointsize is greater than maxPointSize then
set pointsize to maxPointSize
end if
else
set pointsize to 0
end if
else if bindingType is "Saddle Stitch" then
set coverWidth to pageWidth * 2
set spineSize to 0
end if
set to text returned of (display dialog "coverWidth")
end tell