Methods related to ScriptUI
Members
-
staticDuScriptUI.defaultColumnAlignmentArray.<String>
-
The default alignment of children of containers with "column" orientation
- Default Value:
- ["fill","top"]
-
staticDuScriptUI.defaultMarginsint
-
The default margins of containers
- Default Value:
- 2
-
staticDuScriptUI.defaultRowAlignmentArray.<String>
-
The default alignment of children of containers with "row" orientation
- Default Value:
- ["left","center"]
-
staticDuScriptUI.defaultSpacingint
-
The default spacing of containers
- Default Value:
- 2
-
staticDuScriptUI.defaultStackAlignmentArray.<String>
-
The default alignment of children of containers with "stack" orientation
- Default Value:
- ["fill","top"]
-
staticDuScriptUI.IconDuBinary
-
The list of available icons.
Properties:
Name Type Default Description AE_BLUE
DuBinary w8_ae_blue AE_ORANGE
DuBinary w8_ae_orange BACK
DuBinary w12_back BOX_CHECKED
DuBinary w12_box_checked BOX_UNCHECKED
DuBinary w12_box_unchecked BUG
DuBinary w16_bug BUG_REPORT
DuBinary w12_bugreport CHECK
DuBinary w12_check CLOSE
DuBinary w12_close DOWNLOAD
DuBinary w16_download EXPERT
DuBinary w16_expert EYE_DROPPER
DuBinary w12_eye_dropper FEATURE
DuBinary w12_feature FILE
DuBinary w12_file FOLDER
DuBinary w12_folder GO_TO
DuBinary w12_goto HEART
DuBinary w12_heart HELP
DuBinary w12_help LANGUAGE
DuBinary w16_language LIST
DuBinary w16_list MENU
DuBinary w12_menu NEXT
DuBinary w12_next OPTIONS
DuBinary w12_options PIN
DuBinary w12_pin PINNED
DuBinary w12_pinned PLACEHOLDER
DuBinary w16_placeholder RAINBOX_RED
DuBinary w8_rx_red RESET
DuBinary w12_reset ROOKIE
DuBinary w16_rookie RX_PURPLE
DuBinary w8_rx_purple SETTINGS
DuBinary w12_settings SETTINGS_FILE
DuBinary w16_settings_file STANDARD
DuBinary w16_standard UPDATE
DuBinary w12_update USER
DuBinary w16_user -
staticDuScriptUI.Stringstring
-
The list of strings used by the UI.
Properties:
Name Type Default Description AE_BLUE
string After Effects Blue AE_BLUE_TIP
string The After Effects highlighting blue AE_ORANGE
string After Effects Orange (CS6) AE_ORANGE_TIP
string The After Effects highlighting orange from good ol'CS6 APPLY
string Apply APPLY_SETTINGS
string Apply changes to the settings. BACK
string Back BUG_REPORT
string Bug report BUG_REPORT_TIP
string Bug report Tell us what's wrong! CANCEL
string Cancel CHECK_UPDATE
string Check for updates COLOR_HIGHLIGHT_TIP
string Set the highlight color. CUSTOM
string Custom CUSTOM_COLOR_TIP
string Select a custom color CLOSE_SETTINGS
string Close settings DEFAULT
string Default DEV_MODE
string Dev and Debug mode DEV_MODE_TIP
string Use at your own risk! EDIT_SETTINGS
string Edit settings FEATURE_REQUEST
string Feature request FEATURE_REQUEST_TIP
string Feature request Request something new. HELP
string Help HELP_TIP
string Get help. LANGUAGE_TIP
string Set the language of the interface. NEXT
string Next NORMAL_MODE
string Normal mode PATH
string Path PREVIOUS
string Previous RESET_SETTINGS
string Reset the settings to their default values. RX_PURPLE
string RxLab Purple RX_PURPLE_TIP
string The RxLaboratory Purple RX_RED
string Rainbox Red RX_RED_TIP
string The Rainbox Productions Red SETTINGS
string Settings SETTINGS_FILE
string Settings file SETTINGS_FILE_TIP
string Set the location of the settings file. UI_MODE_TIP
string Select the UI mode. ROOKIE
string Rookie ROOKIE_UI_TIP
string The easiest-to-use mode, but also the biggest UI. STANDARD
string Standard STANDARD_UI_TIP
string The standard not-too-big UI. EXPERT
string Expert EXPERT_UI_TIP
string The smallest UI, for expert users.
Methods
-
staticDuScriptUI.addBugButton(container, showLabel){DuButton}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8668 -
Creates a button opening the bug report url.
Name Type Default Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. showLabel
bool false optional When true, the button includes a "Bug Report" label. Returns:
Type Description DuButton The bug button created. -
staticDuScriptUI.addDonateButton(container, showLabel){DuButton}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8766 -
Creates a button opening the link for like/follow/donation
Name Type Default Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. showLabel
bool false optional When true, the button includes a "I ♥ " + DuESF.scriptName
label.Returns:
Type Description DuButton The like button created. -
staticDuScriptUI.addEvent(func, timeOut){int}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10863 -
Adds a function to be run periodically, which will be connected to several UI events, fired when the user interacts with the UI.
Name Type Default Description func
function The function to connect to the UI timeOut
int 3000 optional A timeOut in milliseconds which prevents the function to be run too often Returns:
Type Description int a unique identifier to be used to remove the function later, with DuScriptUI.removeEvent
. -
staticDuScriptUI.addFeatureRequestButton(container, showLabel){DuButton}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8700 -
Creates a button opening the feature request url.
Name Type Default Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. showLabel
bool false optional When true, the button includes a "Feature Request" label. Returns:
Type Description DuButton The feature request button created. -
staticDuScriptUI.addHelpButton(container, showLabel){DuButton}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8732 -
Creates a button opening the help panel.
Name Type Default Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. showLabel
bool false optional When true, the button includes a "Help" label. Returns:
Type Description DuButton The help button created. -
staticDuScriptUI.askLanguage(callback, ui)
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8800 -
Displays a prompt to select the language of the script.
Won't do nothing if the script already has a language set in the settings.
Use this method before launching the script.Name Type Description callback
function The function to execute when the user has chosen the language.
This function should be the one which loads the script.ui
Panel | Window optional A container to display the UI. A modal Dialog is created if omitted -
staticDuScriptUI.buildAllTabs()
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10827 -
Builds all the tabs from all the tab panels
-
staticDuScriptUI.button(container, text, image, helpTip, addOptionsPanel, orientation, alignment, localize, ignoreUIMode){DuButton}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8300 -
Creates a button with an optionnal icon. Must have at least an icon or a text, or both.
Name Type Default Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. text
string optional The label of the button. Default: empty string image
string | DuBInary optional The path to the icon (or a PNG as a string representation). Default: empty string helpTip
string optional The helptip. Default: empty string addOptionsPanel
bool false optional Adds a panel for options and a button to access it. orientation
bool 'row' optional The orientation of the button (icon, text, options button). Default will be changed to 'column' if there's no text. alignment
bool 'left' optional The alignment of the button content ('center', 'right' or 'left' for 'row', 'top' 'bottom', 'center' for column). localize
Boolean true optional Set to false if the text must not be translated. ignoreUIMode
Boolean false optional Will show texte even if the ui mode is set to > 1 in the script settings Returns:
Type Description DuButton The image button created. -
staticDuScriptUI.checkBox(container, text, image, helpTip, textChecked, imageChecked, orientation){DuCheckBox}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9203 -
Creates a checkbox with an optionnal icon. Must have at least an icon or a text, or both.
Name Type Default Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. text
string The label of the button. Default: empty string image
string | DuBinary optional The path to the icon. Default: empty string helpTip
string '' optional The helptip. Default: empty string textChecked
string text optional The label of the button displayed when it is checked. imageChecked
string | DuBinary optional The image to show when it is checked orientation
string 'row' optional The orientation Returns:
Type Description DuCheckBox The checkbox created. -
staticDuScriptUI.checkUpdate(callback, ui, showAlert)
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8873 -
Checks if the script can be updated
Name Type Description callback
function optional The function to execute when the user has clicked on the "dismiss" button. ui
Panel | Window optional A container to display the UI. A modal Dialog is created if omitted showAlert
Boolean optional Wether to show an alert if the check failed or if the version is up-to-date. -
staticDuScriptUI.editText(container, text, prefix, suffix, placeHolder, helpTip, translatable){DuEditText}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9970 -
Creates a nice edittext where the edit text is shown only on click.
Name Type Default Description container
Window | Panel | Group The ScriptUI Object which will contain and display the nice edit text. text
string The initial text in the edit. prefix
string "" optional A text prefix to display. suffix
string "" optional A text suffix to display. placeHolder
string "" optional A place holder default text. helpTip
string "" optional The helpTip of this control translatable
bool true optional Wether to translate the texts of this control Returns:
Type Description DuEditText The custom Group containing the edit text. -
staticDuScriptUI.fileSelector(container, text, textField, helpTip, image, mode, orientation){DuFileSelector}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10259 -
Creates a file selector with a field for the path and a browse button.
Name Type Default Description container
Window | Panel | Group The ScriptUI Object which will contain and display the panel. text
string "Browse..." optional The text to display on the button. textField
boolean true optional Wether to show the text field for the path. helpTip
string '' optional The helptip for this control. image
string | DuBinary optional The image to use as an icon; a "file" icon by default. mode
string 'open' optional The open mode, either 'open' or 'save'. orientation
string 'row' optional The orientation of the control (button+edittext). Returns:
Type Description DuFileSelector The control. -
staticDuScriptUI.folderSelector(container, text, textField, helpTip, orientation){DuFolderSelector}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10161 -
Creates a folder selector with a field for the path and a browse button
Name Type Default Description container
Window | Panel | Group The ScriptUI Object which will contain and display the panel. text
string "Browse..." optional The text to display on the button. textField
boolean true optional Wether to show the text field for the path. helpTip
string '' optional The helptip for this control. orientation
string 'row' optional The orientation of the control (button+edittext). Returns:
Type Description DuFolderSelector The control. -
staticDuScriptUI.form(container){Form}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10581 -
Creates a layout to add forms to a UI, using ScriptUI groups.
You can easily add controls/fields to this form using DuScriptUI.addFieldName Type Description container
Window | Panel | Group The ScriptUI Object which will contain and display the form. Returns:
Type Description Form The custom Group containing the form. -
staticDuScriptUI.getClosestScreen(location){Object}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9573 -
Gets the corners of the screen the closest to (or containing) the location
Name Type Description location
Array.<int> The coordinates Returns:
Type Description Object The screen object with a top, left, right and bottom property. -
staticDuScriptUI.group(container, orientation){Group}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9081 -
Adds a group in a container, using DuScriptUI default alignments, and DuScriptUI.defaultSpacing. Margins are set to 0.
Name Type Description container
Panel | Window | Group Where to create the group orientation
string optional The orientation to use. One of "column", "row" or "stack". By default, "column" if added in a row, "row" if added in a column. Returns:
Type Description Group The group created -
staticDuScriptUI.layout(item)
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9038 -
Resets the layout of the whole ui containing a scriptUI item.
Name Type Description item
ScriptUI The ScriptUI element which needs to be resized -
staticDuScriptUI.mainPanel(container, scriptName, contentAlignment, borderless){DuPanel}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 7261 -
Creates the main panel for a script
Name Type Default Description container
Panel | null The container ('this' in the root of the calling script), either a Panel (when launched from the 'Window' menu) or null (when launched from 'file/scripts/run...') scriptName
string DuESF.scriptName optional A name for this UI contentAlignment
Array.<string> DuScriptUI.defaultColumnAlignment optional The alignment of the content in the panel borderless
string false optional When true, creates a borderless window if container is not a panel Returns:
Type Description DuPanel The panel created, either a ScriptUI Panel or a ScriptUI Window. Example
var ui = DuScriptUI.mainPanel(this,"Test Script"); var refreshButton = ui.content.add('button',undefined,"Refresh"); refreshButton.onClick = function() { ui.refreshUI( new File($.fileName) ); }; //reloads the current script DuScriptUI.showUI(ui);
-
staticDuScriptUI.moveInsideScreen(location, size){Array.<int>}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9551 -
Moves the coordinates so that the size completely fits inside an existing screen
Name Type Description location
Array.<int> The coordinates [top, left] size
Dimension The rectangle size, an object which has two properties: width and height Returns:
Type Description Array.<int> the new location -
staticDuScriptUI.popUp(title, alignment, modal){DuPopup}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 7452 -
Creates a borderless popup
Name Type Default Description title
string The title of the popup alignment
Array.<string> [ "fill", "top" ] optional The alignement of this window modal
boolean false optional Set the popup to a modal dialog Returns:
Type Description DuPopup The popup, a ScriptUI Window which is borderless, with a 'tieTo(control)' method. Example
var popup = DuScriptUI.popUp( ); var popupButton = DuScriptUI.button( myUI, "My Buttton for the popup" ); popup.tieTo( popupButton ); // will show the popup when the button is clicked, just above it.
-
staticDuScriptUI.removeEvent(id)
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10877 -
Removes a function previously added with
DuScriptUI.addEvent
.Name Type Description id
int The id of the function -
staticDuScriptUI.scriptPanel(container, addSettingsButton, addHelpButton, scriptFile){DuScriptPanel}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 7760 -
Creates the main panel of a script
Name Type Default Description container
Panel | null The container ('this' in the root of the calling script), either a Panel (when launched from the 'Window' menu) or null (when launched from 'file/scripts/run...') addSettingsButton
bool true optional Wether to create a button to open the settings or not addHelpButton
bool false optional Wether to create a button to open the help panel or not scriptFile
File optional The main script file, needed for the refresh button in debug mode Returns:
Type Description DuScriptPanel The panel created, either a ScriptUI Panel or a ScriptUI Window. Example
var ui = DuScriptUI.mainPanel(this,"Test Script"); var refreshButton = ui.content.add('button',undefined,"Refresh"); refreshButton.onClick = function() { ui.refreshUI( new File($.fileName) ); }; //reloads the current script DuScriptUI.showUI(ui);
-
staticDuScriptUI.selector(container, helpTip){Selector}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9686 -
Creates a drop down selector, using image buttons
Name Type Description container
Window | Panel | Group The ScriptUI Object which will contain and display the selector. helpTip
bool optional The help tip to show on the selector Returns:
Type Description Selector - The selector -
staticDuScriptUI.separator(container, name, checkable, drawLine){DuSeparator}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9126 -
Adds separator with an optionnal name in the group
Name Type Default Description container
Panel | Window | Group Where to create the separator name
string optional The name displayed checkable
boolean false optional When true, adds a checkbox to the separator drawLine
boolean true optional Draws a line when there is no name. When false, the separator is an empty space Returns:
Type Description DuSeparator The separator -
staticDuScriptUI.setBackgroundColor(uiItem, color)
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9063 -
Changes the color of the background of a ScriptUI Object
Name Type Description uiItem
ScriptUI The ScriptUI Object color
Array The new color [R,V,B,A] Array -
staticDuScriptUI.setTextColor(text, color)
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 9049 -
Changes the color of the text of a ScriptUI Object
Name Type Description text
ScriptUI The ScriptUI Object color
DuColor The new color -
staticDuScriptUI.showUI(ui, enterRunTime)
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 7680 -
Resizes and shows the main panel of a script
Name Type Default Description ui
Panel | Window The UI created by Duik.ui.createUI enterRunTime
boolean false optional Set to true to automatically set DuESF to runtime state
Set this to false if the ui shown is not the actual main panel of the script and it is shown before the main panel has been loaded. -
staticDuScriptUI.slider(container, defaultValue, min, max, orientation, invertedAppearance, prefix, suffix, textAlignment, valueButtons){DuSlider}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10411 -
Creates a slider.
Name Type Default Description container
Window | Panel | Group The ScriptUI Object which will contain and display the nice edit text. defaultValue
int 0 optional The initial value. min
int 0 optional The minimal value. max
int 100 optional The maximal value. orientation
string 'column' optional Either 'row' or 'column' invertedAppearance
boolean optional Revert the slider with max value on the left prefix
string optional A text prefix to display. suffix
string optional A text suffix to display. textAlignment
string 'center' optional The alignment of the text.
One of 'left', 'center', 'right' for column orientation,
And 'top', 'center', 'bottom' for row orientation.valueButtons
Array.<int> [] optional A list of predefined values to add as buttons. - TODO
-
- implement helpTip
Returns:
Type Description DuSlider The custom Group containing the slider. -
staticDuScriptUI.smallbutton(container, text, helpTip, value){DuButton}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8544 -
Creates a small button.
Name Type Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. text
string The label of the button. Default: empty string helpTip
string optional The helptip. Default: empty string value
any optional A user value stored in the button, which is passed to the onClick method Returns:
Type Description DuButton The image button created. -
staticDuScriptUI.staticText(container, text, color, translatable, multiline){StaticText}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10106 -
Creates a statictext (with an optionnal color).
Name Type Default Description container
Window | Panel | Group The ScriptUI Object which will contain and display the nice edit text. text
string The initial text in the edit. color
DuColor optional The color of the text. By default, uses a slightly darker text than the Host App text color translatable
bool true optional Set this to false to never translate this text. multiline
bool optional Set this to true to add a multiline text. Auto detected by default if the text contains the newline character. Returns:
Type Description StaticText The ScriptUI StaticText created. -
staticDuScriptUI.tabPanel(container, tabOrientation){DuTabPanel}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 10722 -
Creates a panel with tabs
Name Type Description container
Window | Panel | Group The ScriptUI Object which will contain and display the panel. tabOrientation
string The orientation to use for tab buttons. Returns:
Type Description DuTabPanel The panel. -
staticDuScriptUI.versionButton(container, image){DuButton}
D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 8641 -
Creates a button displaying the version of the script and redirecting to the about url.
Name Type Default Description container
Panel | Window | Group The ScriptUI Object which will contain and display the button. image
string | DuBinary DuESF.scriptIcon optional The path to the icon or a png binstring. Default: empty string Returns:
Type Description DuButton The version button created.