Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git
# -----------------------------------------------------------------------------
# Copyright 2020 White Magic Software, Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation fihow to use interpolated strings.Open sample chapter.1 )
typer( Key.END1O1Edit the sample document.80 )
2, down )

# Grey
recur( 3, skip_right )
autoinsert()

# 34
recur( 4, skip_right )
autoinsert()

# Central
recur( 10, skip_right )
autoinsert()

# London
skip_right()
autoinsert()

# Hatchery
skip_right()
autoinsert()

# and Conditioning
recur( 2, select_word_right )
delete()

# Centre
skip_right()
autoinsert(
typer( " Let's interpolate those four definitions instead!" )
wait( 4 )
recur( 13, type, Key.BACKSPACE9, backspace60 )

typer( "name$" )
wait( 2 )

# Collapse all definitions
tab()
recur( 8, typer, Key.LEFT )

# Expand to city
recur( 4, typer, Key.RIGHT )

# Jump to name
recur( 2, down )
recur( 2, typer, Key.RIGHT )

# Open the text field to show the full value
typer( Key.F2 )

# Traverse the text field
home()
recur( 16, type, Key.RIGHT, Key.CTRL )
esc()

restore_typing_speed()

tab()
type(_next()
typertyper( "'s" )

edit_find( "Hatcheries" )
autoinsert()

# and Conditioning
recur( 2, select_word_right )
delete()

edit_find( "Central" )
autoinsert()

skip_right()
autoinsert()

typer( " How about a different city?" )
wait( 2 )
recur( 5, type, Key.BACKSPACE, Key.CTRL )
wait( 1 )
tab()
typer( Key.F2 )
typer( "Seattle" )
enter()
tab()
wait( 2 )
No?" )
paragraph()

tab()
typer( Key.F2 )
typer( "London" )
enter()

tab()
typer( "Organizing definitions is left to your ")
typer( "doub" )
autoinsert()
typer( " Good imagination." )
tab()

# Jump to "char" definition
home()

# Jump to "char.a.primary.name" definition
recur( 6, typer, Key.RIGHT )

# Jump to "char.a.primary.caste" definition
down()
typer( Key.RIGHT )

# Jump to root-level "caste" definition
recur( 7, down )

# Reselect "super"
recur( 5, typer, Key.RIGHT )
wait( 2 )

# Close the window, no save
type( "w0.5 )
tab()
wait( 0.5 )
typer( Key.SPACE )
wait( 1 )