Updated scripting docs and added some examples
This commit is contained in:
parent
eceacf34cd
commit
a7278bd50a
13
SCRIPTING.md
13
SCRIPTING.md
@ -53,13 +53,6 @@ simulate time passing and render any frames needed.
|
|||||||
|
|
||||||
delay 100
|
delay 100
|
||||||
|
|
||||||
### goto - Goto a bookmark
|
|
||||||
|
|
||||||
mark %somewhere
|
|
||||||
write "Hello"
|
|
||||||
goto %somewhere
|
|
||||||
write "Goodbye"
|
|
||||||
|
|
||||||
### log - Log debug info
|
### log - Log debug info
|
||||||
|
|
||||||
This command just sends output to the console for debugging.
|
This command just sends output to the console for debugging.
|
||||||
@ -72,7 +65,11 @@ This command just sends output to the console for debugging.
|
|||||||
|
|
||||||
### moveto - Go to position or bookmark
|
### moveto - Go to position or bookmark
|
||||||
|
|
||||||
moveto %here
|
mark %somewhere
|
||||||
|
write "Hello"
|
||||||
|
moveto %somewhere
|
||||||
|
write "Goodbye"
|
||||||
|
|
||||||
moveto 0 0
|
moveto 0 0
|
||||||
|
|
||||||
### savepng - Save the terminal as a png
|
### savepng - Save the terminal as a png
|
||||||
|
39
examples/dd.ftm
Normal file
39
examples/dd.ftm
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
set terminal 80x5
|
||||||
|
set typedelay 250
|
||||||
|
set fps 30
|
||||||
|
|
||||||
|
sub prompt
|
||||||
|
write <home> <sgr fg:green bold> user@host <sgr> : <sgr fg:blue bold> $1 <sgr bold> " $ " <sgr>
|
||||||
|
delay 500
|
||||||
|
endsub
|
||||||
|
|
||||||
|
prompt "~"
|
||||||
|
|
||||||
|
type "dd "
|
||||||
|
mark dd-if
|
||||||
|
type "if=/dev/sdb "
|
||||||
|
annotate @dd-if "Input" at dd-if
|
||||||
|
annotatelength @dd-if 11
|
||||||
|
mark dd-of
|
||||||
|
type "of=image.img "
|
||||||
|
annotate @dd-of "Output" at dd-of
|
||||||
|
annotatelength @dd-of 12
|
||||||
|
mark dd-bs
|
||||||
|
type "bs=16M "
|
||||||
|
annotate @dd-bs "Block\nsize" at dd-bs
|
||||||
|
annotatelength @dd-bs 6
|
||||||
|
mark dd-status
|
||||||
|
type "status=progress "
|
||||||
|
annotate @dd-status "Show progress" at dd-status
|
||||||
|
annotatelength @dd-status 15
|
||||||
|
|
||||||
|
write <return>
|
||||||
|
|
||||||
|
prompt "~"
|
||||||
|
|
||||||
|
delay 2000
|
||||||
|
|
||||||
|
clearannotate
|
||||||
|
|
||||||
|
|
||||||
|
delay 500
|
BIN
examples/dd.gif
Normal file
BIN
examples/dd.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 107 KiB |
Loading…
Reference in New Issue
Block a user