I am creating a Metadata/Document Custom Properties Action Sequence that will allow the user to enter the appropriate information. However, I'm looking for an option that when the dialog box opens the place where you enter text will already have some text in it. I have done this when I use a similar script using a button and I can have the field have text already in it, but this is done as a sequence--with no option like that. Is there a way to do this?
Below is my current script. I'm looking for the text line to auto-fill with the word "Supplied" but still be able to be edited by the customer if needed.
// Dialog Definition
var oDlg =
{
strName: "",
initialize: function(dialog)
{
dialog.load({"usnm":this.strName});
},
commit: function(dialog)
{
var data = dialog.store();
this.strName = data["usnm"];
},
description:
{
name: "eBook Creation",
elements:
[
{
type: "view",
elements:
[
{
name: "File was",
type: "static_text",
},
{
item_id: "usnm",
type: "edit_text",
char_width: 15
},
{
type: "ok_cancel",
},
]
},
]
}
};
// Dialog Activation
oDlg.strName = this.info;
if("ok" == app.execDialog(oDlg))
{
this.info.eBook_Creator= oDlg.strName;
}
thank you in advance for any information or direction.
oDlg.strName = "Supplied";
if("ok" == app.execDialog(oDlg))
{
this.info.eBook_Creator= oDlg.strName;
}
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script