| Both sides previous revision Previous revision | |
| launch_a_script [2025/11/05 22:36] – [Table] lbrpdx | launch_a_script [2025/11/05 22:37] (current) – [Table] beter formatting lbrpdx |
|---|
| </WRAP> | </WRAP> |
| |
| ^ Event name ^ Arguments ^ Notes ^ | ^ Event name ^ Arguments ^ Notes ^ |
| | ''game-start'' | ROM name ''rom'', ROM path ''basename'' (arguments described below) | When a game starts. Nearly identical to Batocera's ''gameStart'', however this doesn't include as much information and only triggers when it's ES itself that starts it. | | | ''game-start'' | ROM name ''rom'', ROM path ''basename'' (arguments described below) | When a game starts. Nearly identical to Batocera's ''gameStart'', however this doesn't include as much information and only triggers when it's ES itself that starts it. | |
| | ''game-end'' | N/A | When a game ends. Nearly identical to Batocera's ''gameStop'', however this only triggers when it's ES itself that ends it. | | | ''game-end'' | N/A | When a game ends. Nearly identical to Batocera's ''gameStop'', however this only triggers when it's ES itself that ends it. | |
| | ''game-selected'' | ''getSourceFileData()->getSystem()->getName()'', ''getPath()'', ''getName()'' | New to Batocera **v33**. Whichever game is currently being hovered over. Includes games shown during the screensaver. | | | ''game-selected'' | ''getSourceFileData()->getSystem()->getName()'', ''getPath()'', ''getName()'' | New to Batocera **v33**. Whichever game is currently being hovered over. Includes games shown during the screensaver. | |
| | ''system-selected'' | System ''getSelected()->getName()'' | New to Batocera **v33**. Whichever system is currently being hovered over in the system list. | | | ''system-selected'' | System ''getSelected()->getName()'' | New to Batocera **v33**. Whichever system is currently being hovered over in the system list. | |
| | ''theme-changed'' | Theme being switched to ''theme_set->getSelected()'', Previous theme ''oldTheme'' | When a different theme is selected. Mostly used for theme/element reloading. | | | ''theme-changed'' | Theme being switched to ''theme_set->getSelected()'', Previous theme ''oldTheme'' | When a different theme is selected. Mostly used for theme/element reloading. | |
| | ''settings-changed'' | N/A | When a system setting is saved. | | | ''settings-changed'' | N/A | When a system setting is saved. | |
| | ''controls-changed'' | N/A | When a controller mapping is saved from the **CONTROLLER MAPPING** menu. | | | ''controls-changed'' | N/A | When a controller mapping is saved from the **CONTROLLER MAPPING** menu. | |
| | ''config-changed'' | N/A | Whenever any configuration, be it system settings or controller mappings, is changed. | | | ''config-changed'' | N/A | Whenever any configuration, be it system settings or controller mappings, is changed. | |
| | ''quit'' | N/A | When the system is told to do a regular shutdown. | | | ''quit'' | N/A | When the system is told to do a regular shutdown. | |
| | ''reboot'' | N/A | When the system is told to do a reboot. | | | ''reboot'' | N/A | When the system is told to do a reboot. | |
| | ''shutdown'' | N/A | When the system is told to do a fast shutdown. | | | ''shutdown'' | N/A | When the system is told to do a fast shutdown. | |
| | ''sleep'' | N/A | When the system is told to sleep. | | | ''sleep'' | N/A | When the system is told to sleep. | |
| | ''wake'' | N/A | When the system is told to wake from sleep. | | | ''wake'' | N/A | When the system is told to wake from sleep. | |
| | ''achievements'' | with arguments described below | When a RetroAchievement is unlocked - new to Batocera **v38** | | | ''achievements'' | with arguments described below | When a RetroAchievement is unlocked - new to Batocera **v38** | |
| | ''screensaver-start'' | N/A | When the screensaver starts | | | ''screensaver-start'' | N/A | When the screensaver starts | |
| | ''screensaver-stop'' | N/A | When the screensaver stops (waken up by user) | | | ''screensaver-stop'' | N/A | When the screensaver stops (waken up by user) | |
| | ''suspend'' | N/A | When the system is told to sleep (but triggered by ''/etc/pm/sleep.d/99es_scripts_runner'' instead of ''sleep'') | | | ''suspend'' | N/A | When the system is told to sleep (but triggered by ''/etc/pm/sleep.d/99es_scripts_runner'' instead of ''sleep'') | |
| | ''resume'' | N/A | When waken up by keyboard action ( triggered by ''/etc/pm/sleep.d/99es_scripts_runner'') | | | ''resume'' | N/A | When waken up by keyboard action ( triggered by ''/etc/pm/sleep.d/99es_scripts_runner'') | |
| | "controller-connected" | device being added to the Batocera machine | New to Batocera **v43**, triggered when a device ''/dev/input/js*'' is connected | | | ''controller-connected'' | device being added to the Batocera machine | New to Batocera **v43**, triggered when a device ''/dev/input/js*'' is connected | |
| | "controller-disconnected" | device being disconnected | New to Batocera **v43**, triggered when a device ''/dev/input/js*'' is disconnected | | | ''controller-disconnected'' | device being disconnected | New to Batocera **v43**, triggered when a device ''/dev/input/js*'' is disconnected | |
| |
| EmulationStation sends different arguments to these scripts based on the event type. For game-related events: | EmulationStation sends different arguments to these scripts based on the event type. For game-related events: |