With the helps from this board, I managed to create a simple dialog box to ask the user to enter the page range for exporting ID files to PDF.
tell application "Adobe InDesign CS3"
activate
set myDialog to make dialog
tell myDialog
set name to "Export PDF"
tell (make dialog column)
tell (make border panel)
tell (make radiobutton group)
set myRangeButton to make radiobutton control with properties {static label:"Range from page "}
make radiobutton control with properties {static label:"All", checked state:true}
end tell
set myStartPageInput to make integer editbox with properties {min width:35}
make static texts with properties {static label:"to page"}
set myEndPageInput to make integer editbox with properties {min width:35}
end tell
end tell
end tell
show myDialog
destroy myDialog
end tell
As you can see from the script, what the user has to do now, is to click the top button manually before or after he has input the page range “ which I felt it is unnecessarily.
I would like to improve it by trigger the top radiobutton as long as the user does input the page range in the editbox (like those professional applications do), but I could not be able to figure it out.
Please advise. Thanks!