Namespace

DuScriptUI

DuScriptUI

Methods related to ScriptUI

View Source DuAEF.jsxinc, line 8789

Members

Array.<String>

# static defaultColumnAlignment

The default alignment of children of containers with "column" orientation
Default Value:
  • ["fill","top"]

View Source DuAEF.jsxinc, line 15051

int

# static defaultMargins

The default margins of containers
Default Value:
  • 2

View Source DuAEF.jsxinc, line 15079

Array.<String>

# static defaultRowAlignment

The default alignment of children of containers with "row" orientation
Default Value:
  • ["left","center"]

View Source DuAEF.jsxinc, line 15058

int

# static defaultSpacing

The default spacing of containers
Default Value:
  • 2

View Source DuAEF.jsxinc, line 15072

Array.<String>

# static defaultStackAlignment

The default alignment of children of containers with "stack" orientation
Default Value:
  • ["fill","top"]

View Source DuAEF.jsxinc, line 15065

ProgressBar

# static fundingBar

A bar used to show current funding status.

View Source DuAEF.jsxinc, line 15085

StaticText

# static fundingLabel

A label used to show current funding status.

View Source DuAEF.jsxinc, line 15091

DuBinary

# static Icon

The list of available icons.
Properties:
Name Type Description
ADD DuBinary
AE_BLUE DuBinary
AE_ORANGE DuBinary
BACK DuBinary
BOX_CHECKED DuBinary
BOX_UNCHECKED DuBinary
BUG DuBinary
BUG_REPORT DuBinary
CHECK DuBinary
CLOSE DuBinary
DOWNLOAD DuBinary
EDIT DuBinary
EXPERT DuBinary
EYE_DROPPER DuBinary
EYE_DROPPER_BIG DuBinary
FEATURE DuBinary
FILE DuBinary
FOLDER DuBinary
FOLDER_CLOSED DuBinary
GO_TO DuBinary
HEART DuBinary
HELP DuBinary
LANGUAGE DuBinary
LANGUAGE_FILE DuBinary
LANGUAGE_SMALL DuBinary
LIST DuBinary
MENU DuBinary
MORE DuBinary
NEXT DuBinary
OPTIONS DuBinary
PARENT DuBinary
PIN DuBinary
PINNED DuBinary
PLACEHOLDER DuBinary
PROGRESS DuBinary
RAINBOX_RED DuBinary
RANDOM DuBinary
REMOVE DuBinary
RESET DuBinary
ROOKIE DuBinary
RUN DuBinary
RX_PURPLE DuBinary
SETTINGS DuBinary
SETTINGS_FILE DuBinary
STANDARD DuBinary
UPDATE DuBinary
USER DuBinary
SEARCH DuBinary
SORT DuBinary
SORT_UP DuBinary
SORT_DOWN DuBinary

View Source DuAEF.jsxinc, line 9379

DuProgressBar

# static progressBar

Show this progress bar before long operations with DuProgressBar.show and DuESF will update it.

View Source DuAEF.jsxinc, line 14226

string

# static String

The list of strings used by the UI.
Properties:
Name Type Description
ABOVE string
ABOVE_SHORT string
ADD_ITEM_OR_CAT string
AE_BLUE string
AE_BLUE_TIP string
AE_ORANGE string
AE_ORANGE_TIP string
APPLY string
APPLY_ALL string
APPLY_SETTINGS string
APPLY_SETTINGS_ALERT string
ARM string
ARTHROPOD string
AUDIO string
AXIS string
BACK_PREVIOUS string
BACK_LOCATION string
BACK_LOCATION_SHORT string
BIRD string
BODY string
BONE string
BUG_REPORT string
BUG_REPORT_TIP string
CAM string
CAMERA string
CANCEL string
CALF string
CATEGORY string
CHARACTER string
CHANNEL string
CHECK_UPDATE string
CIRCLE string
CLAWS string
CLEAR_LIB_TIP string
CLOSE string
COLOR string
COLOR_HIGHLIGHT_TIP string
COPY string
CREATE string
CUSTOM string
CUSTOM_COLOR_TIP string
CLOSE_SETTINGS string
DEFAULT string
DEV_MODE string
DEV_MODE_TIP string
DIGITIGRADE string
EAR string
EDIT string
EDIT_ITEM_OR_CAT string
EDIT_SETTINGS string
EFFECTS string
EXPERT string
EXPERT_UI_TIP string
EYE string
EYES string
EYEBROW string
FEATHER string
FEATHERS string
FEATURE_REQUEST string
FEATURE_REQUEST_TIP string
FILE string
FIN string
FINGERS string
FISH string
FISHBONE string
FISHBONES string
FISH_SPINE string
FOOT string
FOREARM string
FRAME string
FRAMES string
FRONT string
FRONT_LEG string
FRONT_SHORT string
FUNDING_BAR_TIP string
FUNDING_BAR_TIP_DETAILS string
GROUPS string
HAIR string
HAND string
HEAD string
HEEL string
HELP string
HELP_TIP string
HIPS string
HOMINOID string
HOOF string
INVERT string
INVERTED string
ISOLATE string
ITEM string
LANGUAGE_TIP string
LAYER string
LAYERS string
LEFT string
LEFT_SHORT string
LEG string
LIMB string
LOCATION string
LOCATION_SHORT string
MAGIC string
MAIN string
MASKS string
MAXIMUM string
MIDDLE string
MIDDLE_SHORT string
MINIMUM string
MORE_OPTIONS_TIP string
MOUTH string
NAME string
NECK string
NEXT string
NONE string
NORMAL_MODE string
NOSE string
NULL_OBJECT string
OK string
OPACITY string
OPEN string
OPEN_FOLDER string
ORIGINAL string
PATH string
PAW string
PENIS string
PINCER string
PIN_TIP string
PLANTIGRADE string
PREVIOUS string
POLYGON string
POSITION string
PROPERTIES string
RANDOM_TIP string
RECTANGLE string
REFRESH_LIB string
REMOVE string
REMOVE_ITEM_OR_CAT string
RESET_SETTINGS string
RIGHT string
RIGHT_SHORT string
ROOKIE string
ROOKIE_UI_TIP string
ROTATION string
ROUNDED_RECTANGLE string
RUN_EXECUTE string
RX_PURPLE string
RX_PURPLE_TIP string
RX_RED string
RX_RED_TIP string
SAVE_AS string
SCALE string
SCRIPTING string
SELECT_LAYERS string
SELECT_GROUPS string
SET_QUALITY string
SETTINGS string
SETTINGS_FILE string
SETTINGS_FILE_TIP string
SHOULDER string
SHOULDERS string
SHOULDERS_AND_NECK string
SIDE string
SIZE string
SNAKE string
SPINE string
STANDARD string
STANDARD_UI_TIP string
START_TYPING_CMD string
TAIL string
TAIL_SHORT string
TARGET string
TEXT string
TEXTURE string
THIGH string
TIMELINE string
TIP_BONE string
TRANSFORM string
TOES string
TORSO string
TYPE string
UI_MODE_TIP string
UNDER string
UNDER_SHORT string
UNGULATE string
VERTEBRAE string
VULVA string
WING string
WORKING string
X_POSITION string
Y_POSITION string

View Source DuAEF.jsxinc, line 8800

Methods

# static addBugButton(container, showLabelopt) → {DuButton}

Creates a button opening the bug report url.
Parameters:
Name Type Attributes Default Description
container Panel | Window | Group The ScriptUI Object which will contain and display the button.
showLabel bool <optional>
false When true, the button includes a "Bug Report" label.

View Source DuAEF.jsxinc, line 11163

The bug button created.
DuButton

# static addDonateButton(container, showLabelopt) → {DuButton}

Creates a button opening the link for like/follow/donation
Parameters:
Name Type Attributes Default Description
container Panel | Window | Group The ScriptUI Object which will contain and display the button.
showLabel bool <optional>
false When true, the button includes a "I ♥ " + DuESF.scriptName label.

View Source DuAEF.jsxinc, line 11297

The like button created.
DuButton

# static addEvent(func, timeOutopt) → {int}

Adds a function to be run periodically, which will be connected to several UI events, fired when the user interacts with the UI.
Parameters:
Name Type Attributes Default Description
func function The function to connect to the UI
timeOut int <optional>
3000 A timeOut in milliseconds which prevents the function to be run too often

View Source DuAEF.jsxinc, line 15019

a unique identifier to be used to remove the function later, with DuScriptUI.removeEvent.
int

# static addHelpButton(container, showLabelopt) → {DuButton}

Creates a button opening the help panel.
Parameters:
Name Type Attributes Default Description
container Panel | Window | Group The ScriptUI Object which will contain and display the button.
showLabel bool <optional>
false When true, the button includes a "Help" label.

View Source DuAEF.jsxinc, line 11207

The help button created.
DuButton

# static addTranslateButton(container, showLabelopt) → {DuButton}

Creates a button opening the help panel.
Parameters:
Name Type Attributes Default Description
container Panel | Window | Group The ScriptUI Object which will contain and display the button.
showLabel bool <optional>
false When true, the button includes a "Help" label.

View Source DuAEF.jsxinc, line 11252

The help button created.
DuButton

# static askLanguage(callback, uiopt)

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.
Parameters:
Name Type Attributes 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

View Source DuAEF.jsxinc, line 11337

# static buildAllTabs()

Builds all the tabs from all the tab panels

View Source DuAEF.jsxinc, line 13649

# static button(container, textopt, imageopt, helpTipopt, addOptionsPanelopt, orientationopt, alignmentopt, localizeopt, ignoreUIModeopt, optionsWithoutButtonopt, optionsButtonTextopt, optionsWithoutPanelopt) → {DuButton}

Creates a button with an optionnal icon. Must have at least an icon or a text, or both.
Parameters:
Name Type Attributes 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 Boolean <optional>
false Adds a panel for options and a button to access it.
orientation Boolean <optional>
'row' The orientation of the button (icon, text, options button). Default will be changed to 'column' if there's no text.
alignment Boolean <optional>
'left' The alignment of the button content ('center', 'right' or 'left' for 'row', 'top' 'bottom', 'center' for column).
localize Boolean <optional>
true Set to false if the text must not be translated.
ignoreUIMode Boolean <optional>
false Will show texte even if the ui mode is set to > 1 in the script settings
optionsWithoutButton Boolean <optional>
false Don't add an "ok" button to the options popup
optionsButtonText string <optional>
Change the displayed text of the bottom button of the options
optionsWithoutPanel Boolean <optional>
false Don't create the options popup panel (use DuButton.onOptions to add your own callback when the options are requested)

View Source DuAEF.jsxinc, line 10715

The image button created.
DuButton

# static centerInScreen(location, size) → {Array.<int>}

Centers the coordinates in their screen
Parameters:
Name Type Description
location Array.<int> The coordinates [top, left]
size Dimension The rectangle size, an object which has two properties: width and height

View Source DuAEF.jsxinc, line 12212

the new location
Array.<int>

# static checkBox(container, text, imageopt, helpTipopt, textCheckedopt, imageCheckedopt, orientationopt) → {DuCheckBox}

Creates a checkbox with an optionnal icon. Must have at least an icon or a text, or both.
Parameters:
Name Type Attributes 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 <optional>
text The label of the button displayed when it is checked.
imageChecked string | DuBinary <optional>
The image to show when it is checked
orientation string <optional>
'row' The orientation

View Source DuAEF.jsxinc, line 11828

The checkbox created.
DuCheckBox

# static checkUpdate(callbackopt, uiopt, showAlertopt)

Checks if the script can be updated
Parameters:
Name Type Attributes 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>
Whether to show an alert if the check failed or if the version is up-to-date.

View Source DuAEF.jsxinc, line 11409

# static colorSelector(container, helpTipopt) → {DuColorSelector}

Creates a new color selector and adds it to the container
Parameters:
Name Type Attributes Description
container Window | Panel | Group
helpTip string <optional>
The help tip to show on the selector

View Source DuAEF.jsxinc, line 13725

# static compSelector(container, helpTipopt) → {DuAECompSelector}

Creates a drop down selector for compositions
Parameters:
Name Type Attributes Default Description
container Window | Panel | Group The ScriptUI Object which will contain and display the selector.
helpTip string <optional>
"" The help tip.

View Source DuAEF.jsxinc, line 18325

- The selector

# static editText(container, text, prefixopt, suffixopt, placeHolderopt, helpTipopt, localizeopt) → {DuEditText}

Creates a nice edittext where the edit text is shown only on click.
Parameters:
Name Type Attributes 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
localize bool <optional>
true Whether to translate the texts of this control

View Source DuAEF.jsxinc, line 12688

The custom Group containing the edit text.
DuEditText

# static fileSelector(container, textopt, textFieldopt, helpTipopt, imageopt, modeopt, filtersopt, orientationopt) → {DuFileSelector}

Creates a file selector with a field for the path and a browse button.
Parameters:
Name Type Attributes Default Description
container Window | Panel | Group The ScriptUI Object which will contain and display the panel.
text string <optional>
"Browse..." The text to display on the button.
textField boolean <optional>
true Whether 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 <optional>
'open' The open mode, either 'open' or 'save'.
filters string <optional>
The file type filters.
orientation string <optional>
'row' The orientation of the control (button+edittext).

View Source DuAEF.jsxinc, line 13045

The control.

# static folderSelector(container, textopt, textFieldopt, helpTipopt, orientationopt) → {DuFolderSelector}

Creates a folder selector with a field for the path and a browse button
Parameters:
Name Type Attributes Default Description
container Window | Panel | Group The ScriptUI Object which will contain and display the panel.
text string <optional>
"Browse..." The text to display on the button.
textField boolean <optional>
true Whether to show the text field for the path.
helpTip string <optional>
'' The helptip for this control.
orientation string <optional>
'row' The orientation of the control (button+edittext).

View Source DuAEF.jsxinc, line 12945

The control.

# static form(container) → {DuForm}

Creates a layout to add forms to a UI, using ScriptUI groups.
You can easily add controls/fields to this form using DuScriptUI.addField
Parameters:
Name Type Description
container Window | Panel | Group The ScriptUI Object which will contain and display the form.

View Source DuAEF.jsxinc, line 13376

The custom Group containing the form.
DuForm

# static getClosestScreen(location) → {Object}

Gets the corners of the screen the closest to (or containing) the location
Parameters:
Name Type Description
location Array.<int> The coordinates

View Source DuAEF.jsxinc, line 12232

The screen object with a top, left, right and bottom property.
Object

# static group(container, orientationopt) → {Group}

Adds a group in a container, using DuScriptUI default alignments, and DuScriptUI.defaultSpacing. Margins are set to 0.
Parameters:
Name Type Attributes 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.

View Source DuAEF.jsxinc, line 11692

The group created
Group

# static layerPicker(container) → {DuAELayerPicker}

Creates a two-column group to allow the user to pick layers
Parameters:
Name Type Description
container Window | Panel | Group The ScriptUI Object which will contain and display the selector.

View Source DuAEF.jsxinc, line 18575

The picker.

# static layerPickerDialog(title) → {DuAELayerPickerDialog}

Creates a dialog with a DuAELayerPicker
Use DuScriptUI.showUI to show it after creation.
Parameters:
Name Type Description
title string The title of the dialog.

View Source DuAEF.jsxinc, line 18678

The dialog window.

# static layerSelector(container, helpTipopt) → {DuAELayerSelector}

Creates a drop down selector for layers
Parameters:
Name Type Attributes Default Description
container Window | Panel | Group The ScriptUI Object which will contain and display the selector.
helpTip string <optional>
"" The help tip.

View Source DuAEF.jsxinc, line 18027

- The selector

# static layout(item, forceopt)

Resets the layout of the whole ui containing a scriptUI item.
Parameters:
Name Type Attributes Description
item ScriptUI The ScriptUI element which needs to be resized
force Boolean <optional>
Needs to be true if you need to layout before DuESF.state is DuESF.State.RUNTIME.
That should be the case only for the main UI; Note that you should not need it anyway, DuScriptUI.showUI does that for you.

View Source DuAEF.jsxinc, line 11635

# static library(container, library, optionsopt)

Adds a new DuLibrary to the container.
Parameters:
Name Type Attributes Description
container Panel | Window | Group The ScriptUI Object which will contain and display the library.
library DuLibraryItem A library object. Key/value pairs, values being DuLibraryItem objects, keys being their display name.
options object <optional>
Options and other values.

View Source DuAEF.jsxinc, line 14458

# static mainPanel(container, scriptNameopt, contentAlignmentopt, borderlessopt) → {DuPanel}

Creates the main panel for a script
Parameters:
Name Type Attributes 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 <optional>
DuESF.scriptName A name for this UI
contentAlignment Array.<string> <optional>
DuScriptUI.defaultColumnAlignment The alignment of the content in the panel
borderless string <optional>
false When true, creates a borderless window if container is not a panel

View Source DuAEF.jsxinc, line 9562

The panel created, either a ScriptUI Panel or a ScriptUI Window.
DuPanel
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);

# static moveInsideScreen(location, size) → {Array.<int>}

Moves the coordinates so that the size completely fits inside an existing screen
Parameters:
Name Type Description
location Array.<int> The coordinates [top, left]
size Dimension The rectangle size, an object which has two properties: width and height

View Source DuAEF.jsxinc, line 12189

the new location
Array.<int>

# static multiButton(container, textopt, imageopt, helpTipopt, ignoreUIModeopt) → {DuSelector}

Creates a multi button popup
Parameters:
Name Type Attributes Default Description
container Window | Panel | Group The ScriptUI Object which will contain and display the multi button.
text string <optional>
The text.
image string | DuBInary <optional>
The path to the icon (or a PNG as a string representation). Default: empty string
helpTip string <optional>
The help tip to show on the multi button
ignoreUIMode Boolean <optional>
false Will show texte even if the ui mode is set to > 1 in the script settings

View Source DuAEF.jsxinc, line 13820

- The multiButton
DuSelector

# static parentWindow(scriptUIControl) → {Window}

Finds the window containing this ScriptUI Control
Parameters:
Name Type Description
scriptUIControl Control The ScriptUI Control

View Source DuAEF.jsxinc, line 10595

The containing ScriptUI Window
Window

# static popUp(title, alignmentopt, modalopt) → {DuPopup}

Creates a borderless popup
Parameters:
Name Type Attributes Default Description
title string The title of the popup
alignment Array.<string> <optional>
[ "fill", "top" ] The alignement of this window
modal boolean <optional>
false Set the popup to a modal dialog

View Source DuAEF.jsxinc, line 9708

The popup, a ScriptUI Window which is borderless, with a 'tieTo(control)' method.
DuPopup
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.

# static removeEvent(id)

Removes a function previously added with DuScriptUI.addEvent.
Parameters:
Name Type Description
id int The id of the function

View Source DuAEF.jsxinc, line 15033

# static scriptPanel(container, addSettingsButtonopt, addHelpButtonopt, scriptFileopt) → {DuScriptPanel}

Creates the main panel of a script
Parameters:
Name Type Attributes 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 <optional>
true Whether to create a button to open the settings or not
addHelpButton bool <optional>
false Whether 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

View Source DuAEF.jsxinc, line 10052

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);

# static selectionModeSelector(minimalModeopt) → {DuSelector}

Creates a selector to choose a selection mode
Parameters:
Name Type Attributes Default Description
minimalMode DuAE.SelectionMode <optional>
DuAE.SelectionMode.SELECTED_PROPERTIES The lowest mode to use

View Source DuAEF.jsxinc, line 18748

The selector
DuSelector

# static selector(container, helpTipopt) → {DuSelector}

Creates a drop down selector, using image buttons
Parameters:
Name Type Attributes Description
container Window | Panel | Group The ScriptUI Object which will contain and display the selector.
helpTip string <optional>
The help tip to show on the selector

View Source DuAEF.jsxinc, line 12348

- The selector
DuSelector

# static separator(container, nameopt, checkableopt, drawLineopt, translatableopt) → {DuSeparator}

Adds separator with an optionnal name in the group
Parameters:
Name Type Attributes Default Description
container Panel | Window | Group Where to create the separator
name string <optional>
The name displayed
checkable boolean <optional>
false When true, adds a checkbox to the separator
drawLine boolean <optional>
true Draws a line when there is no name. When false, the separator is an empty space
translatable boolean <optional>
true If false, the name won't be translated

View Source DuAEF.jsxinc, line 11739

The separator
DuSeparator

# static setBackgroundColor(uiItem, color, adjustedopt)

Changes the color of the background of a ScriptUI Object
Parameters:
Name Type Attributes Default Description
uiItem ScriptUI The ScriptUI Object
color Array The new color [R,V,B,A] Array
adjusted Boolean <optional>
true lightens the color if the brightness setting of Ae is not set on the darkest one

View Source DuAEF.jsxinc, line 11668

# static setTextColor(text, color, adjustedopt)

Changes the color of the text of a ScriptUI Object
Parameters:
Name Type Attributes Default Description
text ScriptUI The ScriptUI Object
color DuColor The new color
adjusted Boolean <optional>
false lightens the color if the brightness setting of Ae is not set on the darkest one

View Source DuAEF.jsxinc, line 11649

# static settingField(container, textopt, minimumLabelWidthopt) → {DuSettingField}

Creates a DuSettingField which can be enabled or disabled
Parameters:
Name Type Attributes Description
container Panel | Window | Group The ScriptUI Object which will contain and display the setting.
text string <optional>
The label of the setting
minimumLabelWidth int <optional>
The minmimum width of the label

View Source DuAEF.jsxinc, line 14973

The setting created.

# static setupScript(callback, uiopt, scriptNameopt, reInitopt, reInitMethodopt)

Runs the installation wizard for the script (asks for files and network access, asks the language...).
Parameters:
Name Type Attributes Default Description
callback function The function to execute when ready.
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
scriptName string <optional>
DuESF.scriptName The name of the script, used in the UI.
reInit boolean <optional>
false Set to true to display to prompt to reinit/reinstall the script below the button to ask for file access.
reInitMethod function <optional>
A function to run in order to reinit/reinstall the script as soon as we get file access, before running the callback

View Source DuAEF.jsxinc, line 17974

# static showUI(ui, enterRunTimeopt)

Resizes and shows the main panel of a script
Parameters:
Name Type Attributes Default Description
ui Panel | Window The UI created by Duik.ui.createUI
enterRunTime boolean <optional>
false 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.

View Source DuAEF.jsxinc, line 9957

# static slider(container, defaultValueopt, minopt, maxopt, orientationopt, invertedAppearanceopt, prefixopt, suffixopt, textAlignmentopt, valueButtonsopt) → {DuSlider}

Creates a slider.
Parameters:
Name Type Attributes Default Description
container Window | Panel | Group The ScriptUI Object which will contain and display the nice edit text.
defaultValue int <optional>
0 The initial value.
min int <optional>
0 The minimal value.
max int <optional>
100 The maximal value.
orientation string <optional>
'column' 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 <optional>
'center' 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.
To Do:
  • implement helpTip

View Source DuAEF.jsxinc, line 13207

The custom Group containing the slider.
DuSlider

# static smallbutton(container, text, helpTipopt, valueopt) → {DuButton}

Creates a small button.
Parameters:
Name Type Attributes 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

View Source DuAEF.jsxinc, line 11047

The image button created.
DuButton

# static staticText(container, text, coloropt, localizeopt, multiLineopt) → {StaticText}

Creates a statictext (with an optionnal color).
Parameters:
Name Type Attributes 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
localize bool <optional>
true Set this to false to never translate this text.
multiLine bool <optional>
false Set this to true to add a multiline text. Auto detected by default if the text contains the newline character.

View Source DuAEF.jsxinc, line 12881

The ScriptUI StaticText created.
StaticText

# static stringPrompt(title, defaultString) → {DuPopup}

Creates a popup to ask for a simple string
Parameters:
Name Type Description
title string The title of the popup
defaultString string The placeholder for the edit text

View Source DuAEF.jsxinc, line 10536

The popup, with an onAccept( str ) callback.
DuPopup

# static tabPanel(container, tabOrientation) → {DuTabPanel}

Creates a panel with tabs
Parameters:
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.

View Source DuAEF.jsxinc, line 13517

The panel.
DuTabPanel

# static titleBar(container, titleopt, closeButtonopt, pinButtonopt) → {DuTitleBar}

Creates a titlebar
Parameters:
Name Type Attributes Default Description
container Panel | Window | Group The ScriptUI Object which will contain and display the titlebar.
title string <optional>
"" The title.
closeButton Boolean <optional>
true Wether to add a close button
pinButton Boolean <optional>
true Wether to add a pin button

View Source DuAEF.jsxinc, line 9473

The titlebar
DuTitleBar

# static toolBar(container, numColsopt) → {Group}

Creates a toolbar with a lighter background
Parameters:
Name Type Attributes Description
container Panel | Window | Group The ScriptUI Object which will contain and display the toolbar.
numCols int <optional>
The number of columns to use when adding the buttons.

View Source DuAEF.jsxinc, line 14240

The toolbar, a ScriptUI Group
Group

# static versionButton(container, imageopt) → {DuButton}

Creates a button displaying the version of the script and redirecting to the about url.
Parameters:
Name Type Attributes Default Description
container Panel | Window | Group The ScriptUI Object which will contain and display the button.
image string | DuBinary <optional>
DuESF.scriptIcon The path to the icon or a png binstring. Default: empty string

View Source DuAEF.jsxinc, line 11132

The version button created.
DuButton