Adobe 12040118 Using Help - Page 25
folderGetDialog() global function, prompt() global function, Parameters, Returns, Description, Example
UPC - 718659361808
View all Adobe 12040118 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 25 highlights
Help Using Help Reference Back 25 Parameters prompt default type message that appears on the title bar of the dialog; truncated if too long default file name to display in the file-saving dialog; this value must observe the file-naming conventions of the platform on which After Effects is running specified file type Returns File object, or null if the user cancels the dialog. folderGetDialog() global function folderGetDialog(prompt) Description The folderGetDialog global function displays a dialog in which the user can select a folder. Parameters prompt message that appears on the title bar of the dialog; truncated if too long Returns Folder object, or null if the user cancels the dialog. prompt() global function prompt(prompt, default) Description The prompt global function opens a dialog box with a text field into which the user can enter a text string. The text string is returned as a value, or is null if the dialog is cancelled. Parameters prompt default text string that appears in the prompt dialog text string that appears by default in the text field Returns String, or null if dialog is cancelled. Read-only. Example // presuming a project loaded with at least one comp is open: var myCompItem = app.project.item(1); var newName = prompt( "What would you like to name the comp?"); // rename it if (newName) { //if the user cancels, newName is null myCompItem.name = newName; // newName now holds a string } Using Help Back 25