Extcmd: Difference between revisions
Jump to navigation
Jump to search
imported>Dddaaannn (New extcmd()s in 0.1.11e.) |
imported>Felice Enellen (→Examples: syntax highlighting) |
||
| Line 19: | Line 19: | ||
== Examples == | == Examples == | ||
< | <syntaxhighlight lang="lua"> | ||
extcmd('screen') | extcmd('screen') | ||
</ | </syntaxhighlight> | ||
== See also == | == See also == | ||
Revision as of 03:30, 13 February 2018
extcmd( cmd )
- Executes an administrative command from within a program.
- cmd
-
- The command name, as a string.
The command can be one of the following:
'label': Sets the cart label to the current screen.'screen': Saves a screenshot.'rec': Sets the video recording start point.'video': Saves an animated GIF to the desktop.'audio_rec': Starts audio recording.'audio_end': Ends audio recording and saves to the desktop.'pause': Activates the pause menu, as if the player pressed the pause button.'reset': Resets the currently running cart, as if the player pressed the reset key sequence (Control-R or Command-R).'breadcrumb': After a cart uses load() with the breadcrumb parameter to load another cart, loads the original cart, as if the player selected the breadcrumb menu item.
These commands are normally available in Pico-8 when you press function keys during cart execution. extcmd() lets you perform these at precise moments that may be difficult to capture by pressing keys, or when running in non-interactive "headless" mode (the -x command line flag).
Examples
extcmd('screen')