G'day
These are the basic building blocks for an InDesign dialog :
tell application “Adobe InDesign CS4”
activate
set mgDialog to make dialog with properties {name:”The text at the top of the dialog”}
tell mgDialog
tell (make dialog column)
tell (make border panel)
tell (make dialog column)
make static text with properties {static label:”Text field instruction : “, min width:160}
end tell
tell (make dialog column)
set mgTextField to make text editbox with properties {edit contents:”Default Entry”, min width:200}
make static text with properties {static label:”Additional instructions maybe”}
end tell
end tell
tell (make border panel)
tell (make dialog column)
make static text with properties {static label:”Text next to buttons : “, min width:160}
end tell
tell (make dialog column)
set mgButtons to make radiobutton group
tell mgButtons
set mgButton1 to make radiobutton control with properties {static label:”Button1 Label”, checked state:true}
set mgButton2 to make radiobutton control with properties {static label:”Button2 Label”, min width:200}
set mgButton3 to make radiobutton control with properties {static label:”Button3 Label”}
end tell
end tell
end tell
tell (make border panel)
tell (make dialog column)
make static text with properties {static label:”Check box instruction : “, min width:160}
end tell
tell (make dialog column)
set myCheckbox1 to make checkbox control with properties {static label:”Checkbox1 label”, checked state:false, min width:200}
set myCheckbox2 to make checkbox control with properties {static label:”Checkbox2 label”, checked state:false}
set myCheckbox3 to make checkbox control with properties {static label:”Checkbox3 label”, checked state:true}
end tell
end tell
end tell
end tell
set mgResult to show mgDialog
if mgResult is true then
–gather the results for whatever purpose you have
destroy mgDialog
else
error number -128
destroy mgDialog
end if
end tell
Copy this into Script Editor (Application > Applescript) and ensure the first line matches your version of Indesign.
This script just builds a dialog — you then need to capture the results.
You can find some other introductory stuff over at my scripting lessons 08 and 11
Hope that gets you started
m.