3. JavaScript command reference: Difference between revisions

From MXWendler Wiki
Jump to navigation Jump to search
No edit summary
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Here are listed the main commands that can be used for scripting with JS.
=== Legend ===
<div>
The standard used to represent the available values for each command is:
''FLOATS'' are represented with one decimal:
<code>0.0 .. 1.0</code> &rarr; all float values between 0 and 1 included
''INTEGERS'' are represented with numbers or descriptions:
<code>1 .. 5</code> &rarr; all integers between 1 and 5 included ( 1 , 2 , 3 , 4 , 5 ) <br>
<code>1 .. (MAX n layers)</code> &rarr; all the integers between 1 and the maximum index of layers in MXW (e.g. if 6 layers are being used the values are integers between 1 and 6 included)
When only one number is indicated it means that only one option is given. This is found in addresses of buttons, checkboxes and in the options where "0" or "1" are the only significant values
''STRINGS'' are represented between double quotation marks:
<code>/mxw/set info </code>
When <code>“name”</code> is contained in the available string variable, then the content is to be substituted with the actual name.
E.G. :  to select and play a patch called “patch_one” from its name, the address <code>/mxw/set</code> with tokens <code>"play" "name_of_patch"</code> has to be used, resulting in this OSC command:
<code>/mxw/set play patch_one</code>
When <u>OR</u> is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.
Here are listed all the commands that MXW recognizes.
Here are listed all the commands that MXW recognizes.


Line 32: Line 66:


When <u>OR</u> is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.
When <u>OR</u> is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.


===Set Reference===
===Set Reference===
Line 37: Line 72:
{| class="wikitable"
{| class="wikitable"
|-
|-
! OSC ADDRESS !! DESCRIPTION !! EXAMPLE
! JS COMMAND !! DESCRIPTION !! EXAMPLE
|-
!colspan="3" |Software Info
|-
|<code>mxw.millis</code>|| returns the amount of milliseconds passed since opening the software|| <code>print_console("current passed time is" + mxw.millis );</code>
|-
|<code>mxw.width</code>||returns the current frame width in px|| <code>print_console("frame width is" + mxw.width );</code>
|-
|-
|<code> mxw.millis </code>||returns the amount of milliseconds passed since opening the software|| <code>print_console("current passed time is" + mxw.millis );</code>  
|<code>mxw.height</code>||returns the current frame height in px|| <code>print_console("frame height is" + mxw.height);</code>
|-
|-
| <code>mxw.width</code>||returns the current frame width in px|| <code>print_console("frame width is" + mxw.width );</code>
|<code>mxw.outwidth</code>||returns current output width|| <code>print_console("output height is" + outwidth);</code>
|-
|-
| <code>mxw.height</code>||returns the current frame height in px|| <code>print_console("frame height is" + mxw.height);</code>
|<code>mxw.outheight</code>||returns the current output height|| <code>print_console("output width is" + mxw.outheight);</code>  
|-
|-
| <code>mxw.outwidth</code>||returns current output width|| <code>print_console("frame height is" + mxw.height)</code>
|<code>mxw.framecounter</code>||returns the amount of frames rendered since opening the software|| <code>print_console("total number of frames rendered is" + mxw.framecounter);</code>  
|-
|-
| <code>mxw.outheight</code>||returns the current output height|| <code>print_console("frame height is" + mxw.height);</code>  
|<code>print_console("text" + mxw.widget("/mxw/path").getStringValue())</code> || prints the name of the desired playlist cue || <code>print_console("The clip name in the second cue is" + mxw.widget("/mxw/playlist/container/1/column/0/row/1").getStringValue());</code>
|-
|-
| <code>mxw.framecounter</code>||returns the amount of frames rendered since opening the software|| <code>print_console("total number of frames rendered is" + mxw.framecounter);</code>  
|<code>print_statusline("text")</code> || print text on the status line|| <code>print text on status line()</code>
|-
|-
| <code>mxw.dmx()</code> ||returns the DMX value received from the specified universe and channel|| <code>print_console("DMX value in u. 1, ch. 4 is" + mxw.dmx(1,4));</code>
!colspan="3" | I/O
|-
|-
| <code>mxw.midi()</code>||returns the MIDI value received from the specified device and channel|| <code>print_console("MIDI value in dev. 1, ch. 6 is" + mxw.midi(1,6));</code>  
|<code>mxw.dmx()</code> ||returns the DMX value received from the specified universe and channel|| <code>print_console("DMX value in u. 1, ch. 4 is" + mxw.dmx(1,4));</code>
|-
|-
| <code>/mxw/beatbutton</code> || Send pulse to beat-button (BPM)|| <code>1</code>
|<code>mxw.midi()</code>||returns the MIDI value received from the specified device and channel|| <code>print_console("MIDI value in dev. 1, ch. 6 is" + mxw.midi(1,6));</code>  
|-
|-
| <code>/mxw/playlist info</code> || return information on the state of the playback of playlist|| <code>"info"</code>
|<code>mxw.keyboard("ASCII_code")</code> || returns if the specified key is pressed or not || <code>mxw.keyboard(65)</code>
|-
|-
|<code>mxw.pjlink("on", "IP_ADDRESS", "pj_password")</code> || sends a pjlink command to the selected projector and turns it on || <code>mxw.pjlink("on", "192.168.1.2", "panasonic")</code>
|-
|<code>mxw.pjlink("off", "IP_ADDRESS", "pj_password")</code> || sends a pjlink command to the selected projector and turns it off|| <code>mxw.pjlink("off", "192.168.1.2", "panasonic")</code>
|-
|<code>mxw.pjlink("avmute_on", "IP_ADDRESS", "pj_password")</code> || sends a pjlink command to the selected projector and mutes audio and video || <code>mxw.pjlink("avmute_on", "192.168.1.2", "panasonic")</code>
|-
|<code>mxw.pjlink("avmute_off", "IP_ADDRESS", "pj_password")</code> || sends a pjlink command to the selected projector and unmutes audio and video || <code>mxw.pjlink("avmute_off", "192.168.1.2", "panasonic")</code>
|-
|<code>mxw.pjlink("vmute_on", "IP_ADDRESS", "pj_password")</code> || sends a pjlink command to the selected projector and mutes video || <code>mxw.pjlink("vmute_on", "192.168.1.2", "panasonic")</code>
|-
|<code>mxw.pjlink("vmute_off", "IP_ADDRESS", "pj_password")</code> || sends a pjlink command to the selected projector and unmutes video || <code>mxw.pjlink("vmute_off", "192.168.1.2", "panasonic")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_is_supported")</code> || control if a NDI Camera supports PTZ || <code>mxw.media("USB Cam").ptz("ptz_is_supported")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_zoom", value)</code> || control the zoom of a NDI PTZ Camera, values from 0(zoomed in) to 1(zoomed out) || <code>mxw.media("USB Cam").ptz("ptz_zoom", 0.5)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_pan_tilt", value_pan, value_tilt)</code> || control the pan and tilting of a NDI PTZ Camera (values from -1 to 1) || <code><code>mxw.media("USB Cam").ptz("ptz_pan_tilt", -0.5, 0.2)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_zoom_speed", value)</code> || control the zoom speed a NDI PTZ Camera, values from -1(zoom outwards) to 1 (zoom inwards) || <code><code>mxw.media("USB Cam").ptz("ptz_zoom", 0.5)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_pan_tilt_speed", pan_speed, tilt_speed)</code> || control the pan and tilt speed a NDI PTZ Camera, values -1 (move right/down) to 1 (move left/up) || <code>mxw.media("USB Cam").ptz("ptz_pan_tilt_speed", -0.3, 0.8)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_store_preset", preset_number)</code> || store current position, focus, zoom, values 0 to 99 || <code>mxw.media("USB Cam").ptz("ptz_store_preset", 75)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_recall_preset",preset_number, speed)</code> || recalls a previously stored preset,values 0 to 99 and changes to it at a specific speed (values 0 to 1) || <code>mxw.media("USB Cam").ptz("ptz_recall_preset", 4, 0.5 )</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_auto_focus")</code> || activates or deactivates the camera in auto-focus || <code>mxw.media("USB Cam").ptz("ptz.autofocus")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_focus", focus_value)</code> || focus to absolute value (0= focused to infinity, 1= focus the closest possible)|| <code>mxw.media("USB Cam").ptz("ptz_focus", 0.5)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_focus_speed", speed_value)</code> || focus at a particular speed, values from -1(outwards), to  1 (inwards)|| <code>mxw.media("USB Cam").ptz("ptz_focus_speed", -0.2)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_white_balance_auto")</code> || put the camera in auto white-balance mode || <code>mxw.media("USB Cam").ptz("ptz_white_balance_auto")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_white_balance_indoor")</code> || put the camera in indoor white balance || <code> mxw.media("USB Cam").ptz("ptz_white_balance_indoor")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_white_balance_outdoor")</code> || put the camera in outdoor white balance || <code> mxw.media("USB Cam").ptz("ptz_white_balance_outdoor")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_white_balance_oneshot")</code> ||use the current brightness to automatically set the current white balance|| <code>mxw.media("USB_Cam").ptz("ptz_white_balance_oneshot")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_white_balance_manual", red value, blue value)</code> || Set the manual camera white balance using the R, B values, (0.0 = not red/not blue , 1.0 = very red/very blue)|| <code>mxw.media("camera_name").ptz("ptz_white_balance_manual", 0.1, 0.7)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_exposure_auto")</code> || put the camera in auto-exposure mode || <code>mxw.media("USB_Cam").ptz("ptz_exposure_auto")</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_exposure_manual", exposure_level)</code> || manually set the camera exposure iris, values from 0.0(dark) to 1.0(light)|| <code>mxw.media("USB_Cam").ptz("ptz_exposure_manual", 0.4)</code>
|-
|<code>mxw.media("camera_name").ptz("ptz_exposure_manual_v2", iris_level, gain_level, shutter_speed)</code> || Manually set the camera exposure parameters, values iris from 0.0(dark) to 1.0(light), values gain from 0.0(dark) to 1.0(light), values shutter_speed from 0.0(slow) to 1.0(fast) || <code> mxw.media("USB_Cam").ptz("ptz_exposure_manual_v2", 0.4, 0.2, 0.5) </code>
|-
!colspan="3" |Playlist Control
|-
|<code>mxw.playlist.preload_media()</code> || preload used media || <code>mxw.playlist.preload_media()</code>
|-
|<code>mxw.playlist.pause()</code> || pause the playlists or restart if already paused|| <code>mxw.playlist.pause()</code>
|-
|<code>mxw.playlist.play()</code> || play the playlist || <code>mxw.playlist.play()</code>
|-
|<code>mxw.playlist.go_pause()( true/false )</code> || pause the playlist (when true), unpause the playlist (when false) || <code>mxw.playlist.go_pause()(true)</code>
|-
|<code>mxw.playlist.skiptonext()</code> || skip to the next cue || <code>mxw.playlist.skiptonext()</code>
|-
|<code>mxw.playlist.go_next()</code> || go to the next cue without playing || <code>mxw.playlist.go_next()</code>
|-
|<code>mxw.playlist.go_prev()</code> || go to previous cue || <code>mxw.playlist.go_prev()</code>
|-
|<code>mxw.playlist.go_first()</code> || go to the first cue || <code>mxw.playlist.go_first()</code>
|-
|<code>mxw.playlist.navigate_index(index_value)</code> || go to the specified cue index|| <code>mxw.playlist.navigate_index(2)</code>
|-
|<code>mxw.playlist.navigate_string("index_string")</code> || go to the specified cue string|| <code>mxw.playlist.navigate_string("BG_video2")</code>
|-
!colspan="3" |Preload Control
|-
|<code>mxw.preload(preload_number).clear()</code> || clears the selected preload || <code>mxw.preload(2).clear()</code>
|-
|<code>mxw.preload(preload_number).set_media("media_name")</code> || set a media in the preload with a filename string || <code>mxw.preload(preload_number).set_media("try.mp4")</code>
|-
|<code>mxw.preload(preload_number).set_name("new_media_name")</code> || renames a preload || <code>mxw.preload(4).set_name("new_background")</code>
|-
|<code>mxw.preload(preload_number).add_preload()</code> || load a preload in the layers || <code>mxw.preload(3).add_preload()</code>
|-
|<code>mxw.preload(preload_number).trigger_preload()</code> || trigger a layer from the preload || <code>mxw.preload(5).trigger_preload()</code>
|-
|<code>mxw.preload(preload_number).get_activated()</code> || requests if the preload is editable || <code>mxw.preload(9).get_activated()</code>
|-
|<code>mxw.preload(preload_number).set_activated(true/false)</code> || opens the preload for edit and viceversa || <code>mxw.preload(12).set_activated(false)</code>
|-
|<code>mxw.preload(preload_number).get_layer_position()</code> || returns the layer index of the preload|| <code>mxw.preload(1).get_layer_position()</code>
|-
|<code>mxw.preload(preload_number).get_track_position()</code> || returns the track index of the preload|| <code>mxw.preload(8).get_track_position()</code>
|-
|<code>mxw.preload(preload_number).set_layer_position(layer_pos)</code> || set layer index of the preload|| <code>mxw.preload(7).set_layer_position(2)</code>
|-
|<code>mxw.preload(preload_number).set_track_position(track_pos)</code> || set the track index of the preload|| <code>mxw.preload(11).set_track_position(2)</code>
|-
|<code>mxw.makesectionscreenshot("directory_saving_path", initial_x, initial_y, size_x, size_y)</code> || saves a cropped screenshot in the desiderd path|| <code>mxw.makesectionscreenshot("c:/Users/MXWendler/Desktop/b.png", 0,1, 400, 200)</code>
|-
|<code>mxw.widget("/mxw/path").setStringValue("named by script")</code> || set the name of a cue in the playlist|| <code>mxw.widget("/mxw/playlist/container/1/column/0/row/1").setStringValue("background videoclip")</code>
|-
|}
|}

Latest revision as of 16:52, 17 October 2023

Here are listed the main commands that can be used for scripting with JS.

Legend

The standard used to represent the available values for each command is:


FLOATS are represented with one decimal:

0.0 .. 1.0 → all float values between 0 and 1 included


INTEGERS are represented with numbers or descriptions:

1 .. 5 → all integers between 1 and 5 included ( 1 , 2 , 3 , 4 , 5 )
1 .. (MAX n layers) → all the integers between 1 and the maximum index of layers in MXW (e.g. if 6 layers are being used the values are integers between 1 and 6 included)

When only one number is indicated it means that only one option is given. This is found in addresses of buttons, checkboxes and in the options where "0" or "1" are the only significant values


STRINGS are represented between double quotation marks:

/mxw/set info

When “name” is contained in the available string variable, then the content is to be substituted with the actual name.

E.G. : to select and play a patch called “patch_one” from its name, the address /mxw/set with tokens "play" "name_of_patch" has to be used, resulting in this OSC command:

/mxw/set play patch_one


When OR is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.

Here are listed all the commands that MXW recognizes.

Legend

The standard used to represent the available values for each command is:


FLOATS are represented with one decimal:

0.0 .. 1.0 → all float values between 0 and 1 included


INTEGERS are represented with numbers or descriptions:

1 .. 5 → all integers between 1 and 5 included ( 1 , 2 , 3 , 4 , 5 )
1 .. (MAX n layers) → all the integers between 1 and the maximum index of layers in MXW (e.g. if 6 layers are being used the values are integers between 1 and 6 included)

When only one number is indicated it means that only one option is given. This is found in addresses of buttons, checkboxes and in the options where "0" or "1" are the only significant values


STRINGS are represented between double quotation marks:

/mxw/set info

When “name” is contained in the available string variable, then the content is to be substituted with the actual name.

E.G. : to select and play a patch called “patch_one” from its name, the address /mxw/set with tokens "play" "name_of_patch" has to be used, resulting in this OSC command:

/mxw/set play patch_one


When OR is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.


Set Reference

JS COMMAND DESCRIPTION EXAMPLE
Software Info
mxw.millis returns the amount of milliseconds passed since opening the software print_console("current passed time is" + mxw.millis );
mxw.width returns the current frame width in px print_console("frame width is" + mxw.width );
mxw.height returns the current frame height in px print_console("frame height is" + mxw.height);
mxw.outwidth returns current output width print_console("output height is" + outwidth);
mxw.outheight returns the current output height print_console("output width is" + mxw.outheight);
mxw.framecounter returns the amount of frames rendered since opening the software print_console("total number of frames rendered is" + mxw.framecounter);
print_console("text" + mxw.widget("/mxw/path").getStringValue()) prints the name of the desired playlist cue print_console("The clip name in the second cue is" + mxw.widget("/mxw/playlist/container/1/column/0/row/1").getStringValue());
print_statusline("text") print text on the status line print text on status line()
I/O
mxw.dmx() returns the DMX value received from the specified universe and channel print_console("DMX value in u. 1, ch. 4 is" + mxw.dmx(1,4));
mxw.midi() returns the MIDI value received from the specified device and channel print_console("MIDI value in dev. 1, ch. 6 is" + mxw.midi(1,6));
mxw.keyboard("ASCII_code") returns if the specified key is pressed or not mxw.keyboard(65)
mxw.pjlink("on", "IP_ADDRESS", "pj_password") sends a pjlink command to the selected projector and turns it on mxw.pjlink("on", "192.168.1.2", "panasonic")
mxw.pjlink("off", "IP_ADDRESS", "pj_password") sends a pjlink command to the selected projector and turns it off mxw.pjlink("off", "192.168.1.2", "panasonic")
mxw.pjlink("avmute_on", "IP_ADDRESS", "pj_password") sends a pjlink command to the selected projector and mutes audio and video mxw.pjlink("avmute_on", "192.168.1.2", "panasonic")
mxw.pjlink("avmute_off", "IP_ADDRESS", "pj_password") sends a pjlink command to the selected projector and unmutes audio and video mxw.pjlink("avmute_off", "192.168.1.2", "panasonic")
mxw.pjlink("vmute_on", "IP_ADDRESS", "pj_password") sends a pjlink command to the selected projector and mutes video mxw.pjlink("vmute_on", "192.168.1.2", "panasonic")
mxw.pjlink("vmute_off", "IP_ADDRESS", "pj_password") sends a pjlink command to the selected projector and unmutes video mxw.pjlink("vmute_off", "192.168.1.2", "panasonic")
mxw.media("camera_name").ptz("ptz_is_supported") control if a NDI Camera supports PTZ mxw.media("USB Cam").ptz("ptz_is_supported")
mxw.media("camera_name").ptz("ptz_zoom", value) control the zoom of a NDI PTZ Camera, values from 0(zoomed in) to 1(zoomed out) mxw.media("USB Cam").ptz("ptz_zoom", 0.5)
mxw.media("camera_name").ptz("ptz_pan_tilt", value_pan, value_tilt) control the pan and tilting of a NDI PTZ Camera (values from -1 to 1) mxw.media("USB Cam").ptz("ptz_pan_tilt", -0.5, 0.2)
mxw.media("camera_name").ptz("ptz_zoom_speed", value) control the zoom speed a NDI PTZ Camera, values from -1(zoom outwards) to 1 (zoom inwards) mxw.media("USB Cam").ptz("ptz_zoom", 0.5)
mxw.media("camera_name").ptz("ptz_pan_tilt_speed", pan_speed, tilt_speed) control the pan and tilt speed a NDI PTZ Camera, values -1 (move right/down) to 1 (move left/up) mxw.media("USB Cam").ptz("ptz_pan_tilt_speed", -0.3, 0.8)
mxw.media("camera_name").ptz("ptz_store_preset", preset_number) store current position, focus, zoom, values 0 to 99 mxw.media("USB Cam").ptz("ptz_store_preset", 75)
mxw.media("camera_name").ptz("ptz_recall_preset",preset_number, speed) recalls a previously stored preset,values 0 to 99 and changes to it at a specific speed (values 0 to 1) mxw.media("USB Cam").ptz("ptz_recall_preset", 4, 0.5 )
mxw.media("camera_name").ptz("ptz_auto_focus") activates or deactivates the camera in auto-focus mxw.media("USB Cam").ptz("ptz.autofocus")
mxw.media("camera_name").ptz("ptz_focus", focus_value) focus to absolute value (0= focused to infinity, 1= focus the closest possible) mxw.media("USB Cam").ptz("ptz_focus", 0.5)
mxw.media("camera_name").ptz("ptz_focus_speed", speed_value) focus at a particular speed, values from -1(outwards), to 1 (inwards) mxw.media("USB Cam").ptz("ptz_focus_speed", -0.2)
mxw.media("camera_name").ptz("ptz_white_balance_auto") put the camera in auto white-balance mode mxw.media("USB Cam").ptz("ptz_white_balance_auto")
mxw.media("camera_name").ptz("ptz_white_balance_indoor") put the camera in indoor white balance mxw.media("USB Cam").ptz("ptz_white_balance_indoor")
mxw.media("camera_name").ptz("ptz_white_balance_outdoor") put the camera in outdoor white balance mxw.media("USB Cam").ptz("ptz_white_balance_outdoor")
mxw.media("camera_name").ptz("ptz_white_balance_oneshot") use the current brightness to automatically set the current white balance mxw.media("USB_Cam").ptz("ptz_white_balance_oneshot")
mxw.media("camera_name").ptz("ptz_white_balance_manual", red value, blue value) Set the manual camera white balance using the R, B values, (0.0 = not red/not blue , 1.0 = very red/very blue) mxw.media("camera_name").ptz("ptz_white_balance_manual", 0.1, 0.7)
mxw.media("camera_name").ptz("ptz_exposure_auto") put the camera in auto-exposure mode mxw.media("USB_Cam").ptz("ptz_exposure_auto")
mxw.media("camera_name").ptz("ptz_exposure_manual", exposure_level) manually set the camera exposure iris, values from 0.0(dark) to 1.0(light) mxw.media("USB_Cam").ptz("ptz_exposure_manual", 0.4)
mxw.media("camera_name").ptz("ptz_exposure_manual_v2", iris_level, gain_level, shutter_speed) Manually set the camera exposure parameters, values iris from 0.0(dark) to 1.0(light), values gain from 0.0(dark) to 1.0(light), values shutter_speed from 0.0(slow) to 1.0(fast) mxw.media("USB_Cam").ptz("ptz_exposure_manual_v2", 0.4, 0.2, 0.5)
Playlist Control
mxw.playlist.preload_media() preload used media mxw.playlist.preload_media()
mxw.playlist.pause() pause the playlists or restart if already paused mxw.playlist.pause()
mxw.playlist.play() play the playlist mxw.playlist.play()
mxw.playlist.go_pause()( true/false ) pause the playlist (when true), unpause the playlist (when false) mxw.playlist.go_pause()(true)
mxw.playlist.skiptonext() skip to the next cue mxw.playlist.skiptonext()
mxw.playlist.go_next() go to the next cue without playing mxw.playlist.go_next()
mxw.playlist.go_prev() go to previous cue mxw.playlist.go_prev()
mxw.playlist.go_first() go to the first cue mxw.playlist.go_first()
mxw.playlist.navigate_index(index_value) go to the specified cue index mxw.playlist.navigate_index(2)
mxw.playlist.navigate_string("index_string") go to the specified cue string mxw.playlist.navigate_string("BG_video2")
Preload Control
mxw.preload(preload_number).clear() clears the selected preload mxw.preload(2).clear()
mxw.preload(preload_number).set_media("media_name") set a media in the preload with a filename string mxw.preload(preload_number).set_media("try.mp4")
mxw.preload(preload_number).set_name("new_media_name") renames a preload mxw.preload(4).set_name("new_background")
mxw.preload(preload_number).add_preload() load a preload in the layers mxw.preload(3).add_preload()
mxw.preload(preload_number).trigger_preload() trigger a layer from the preload mxw.preload(5).trigger_preload()
mxw.preload(preload_number).get_activated() requests if the preload is editable mxw.preload(9).get_activated()
mxw.preload(preload_number).set_activated(true/false) opens the preload for edit and viceversa mxw.preload(12).set_activated(false)
mxw.preload(preload_number).get_layer_position() returns the layer index of the preload mxw.preload(1).get_layer_position()
mxw.preload(preload_number).get_track_position() returns the track index of the preload mxw.preload(8).get_track_position()
mxw.preload(preload_number).set_layer_position(layer_pos) set layer index of the preload mxw.preload(7).set_layer_position(2)
mxw.preload(preload_number).set_track_position(track_pos) set the track index of the preload mxw.preload(11).set_track_position(2)
mxw.makesectionscreenshot("directory_saving_path", initial_x, initial_y, size_x, size_y) saves a cropped screenshot in the desiderd path mxw.makesectionscreenshot("c:/Users/MXWendler/Desktop/b.png", 0,1, 400, 200)
mxw.widget("/mxw/path").setStringValue("named by script") set the name of a cue in the playlist mxw.widget("/mxw/playlist/container/1/column/0/row/1").setStringValue("background videoclip")