Difference between revisions of "Execute Property"

From MSX - Wiki
Jump to navigation Jump to search
Line 6: Line 6:
 
== Example ==
 
== Example ==
 
=== Screenshot ===
 
=== Screenshot ===
[[File:settings_item.png|thumb|640px|none|Example Screenshot (Settings Menu Item)]]
+
[[File:execute_property.png|thumb|640px|none|Example Screenshot (Execute Property)]]
  
 
=== Code ===
 
=== Code ===

Revision as of 10:40, 15 January 2021

It is possible to set an execute property (of type boolean) to a content item to automatically execute it on load. This feature is available since version 0.1.0. Since version 0.1.120, the execute property can also be set to a menu item to automatically enter the menu data on load. The internal focus and execute properties of the entered menu data are also evaluated.

Note: To use this property, the focus property must be set to true, otherwise this property is ignored. This property has no effect if the content is loaded via a menu and the corresponding menu item has not set the focus and execute property to true.

Please see following code example.

Example[edit]

Screenshot[edit]

Example Screenshot (Execute Property)

Code[edit]

{
    "type": "pages",
    "headline": "Videos",
    "template": {      
        "type": "separate",
        "layout": "0,0,2,4",
        "icon": "msx-white-soft:movie",
        "color": "msx-glass"
    },
    "items": [{
            "focus": true,
            "execute": true,
            "title": "Video 1",
            "action": "video:http://msx.benzac.de/media/video1.mp4"
        }, {
            "title": "Video 2",
            "action": "video:http://msx.benzac.de/media/video2.mp4"
        }, {
            "title": "Video 3",
            "action": "video:http://msx.benzac.de/media/video3.mp4"
        }]
}

Demo[edit]