State
The state functions within the ui
module are used to query and control the
state of FL Studio's user interface.
isClosing
Returns True
when FL Studio is closing.
Returns
bool
: whether is closing.
Included since API version 1.
isMetronomeEnabled
Returns whether the metronome is enabled.
Returns
bool
: whether metronome is enabled.
Included since API version 1.
isStartOnInputEnabled
Returns whether start on input is enabled.
Returns
bool
: whether start on input is enabled.
Included since API version 1.
isPrecountEnabled
Returns whether precount is enabled.
Returns
bool
: whether precount is enabled.
Included since API version 1.
isLoopRecEnabled
Returns whether loop recording is enabled.
Returns
bool
: whether loop recording is enabled.
Included since API version 1.
getSnapMode
Returns the current snap mode.
Returns
int
: a snap mode from this list
Included since API version 1.
snapMode
Changes the snap mode, by shifting it by value
in the list of modes.
This can be used by controls such as jog wheels or arrow buttons to select
a snapping mode. To select a value directly, use ui.setSnapMode()
.
Args
value
(int
): delta (1
for next,-1
for previous).
Returns
int
: ???
Included since API version 1.
setSnapMode
Set the snap mode using an absolute value.
This can be used on a controller to have different buttons map to different
modes. To increment or decrement the value, use ui.snapMode()
.
Args
value
(int
): a snap mode from this list
Included since API version 24.
snapOnOff
Toggle whether snapping is enabled globally.
Returns
int
: ?
Included since API version 1
getTimeDispMin
Returns True
when the song position panel is displaying time, rather
than bar and beat.
Returns
bool
: whether song position is displaying time.
Included since API version 1.
setTimeDispMin
Toggles whether the song position panel is displaying time or bar and beat.
Included since API version 1.
getHintMsg
Returns the current message in FL Studio's hint panel.
Returns
str
: hint.
Included since API version 1.
setHintMsg
Sets the current hint message in FL Studio's hint panel to msg
.
For information about using icons within hint messages, refer to the hint message icon tutorial.
Args
msg
(str
): new message.
Included since API version 1.
showNotification
Show a notification to the user, which is chosen from a set of notification
strings. This notification appears in the hint panel, much like with
ui.setHintMsg()
, except with less customization. Currently
there is no apparent way to link these to the Script output window.
WARNING
- This function appears to cause FL Studio's scripting environment to crash when used under Wine on Linux.
Note
- This function is not documented.
Args
-
notificationId
(int
): Notification ID, the identifier of the notification string to send.-
0
:"Now firmware is available for your MIDI device"
-
1
:"New version of script is available"
-
Included since API Version 20
getHintValue
getProgTitle
Returns the title of the FL Studio window.
Returns
str
: program title.
Included since API version 1.
getVersion
Returns the version number of FL Studio.
Args
-
mode
(int
, optional):-
VER_Major
(0
): Major version number (asint
) Eg:20
. -
VER_Minor
(1
): Minor version number (asint
) Eg:8
. -
VER_Release
(2
): Release version number (asint
) Eg:4
. -
VER_Build
(3
): Program build number (asint
) Eg:2553
. -
VER_VersionAndEdition
(4
): Program version and edition (asstr
). Eg:"Producer Edition v20.8.4 [build 2553]"
-
VER_FillVersionAndEdition
(5
): Full version and edition (asstr
). Eg:"Producer Edition v20.8.4 [build 2553] - Signature Bundle - 64Bit"
. -
VER_ArchAndBuild
(6
): Operating system and system architecture. Eg:"Windows - 64Bit [BETA]"
-
Returns
int
orstr
: FL Studio version information.
Included since API version 1, with mode parameter since API version 7.
getStepEditMode
Returns the value of the "step edit mode" within FL Studio.
Returns
bool
:True
if step editing is enabled, elseFalse
.
Included since API Version 28.