# Page tools (v1.5): rotate, move, delete, blank page, insert a PDF, undo/redo, search on moved and
# inserted pages, save (whole file after a delete), save as. On a copy of test/sample.pdf (12 pages).
wait 1200
state test/out/t19_01_open.txt
echo --- rotate page 2 clockwise (right-click, R)
prclick 2 300 300
wait 300
shotscreen test/out/t19_02_menu.png
key r
wait 900
state test/out/t19_02_rot.txt
shotscreen test/out/t19_02_rot.png
echo --- move page 2 down (W): it becomes page 3
prclick 2 300 200
wait 300
key w
wait 900
state test/out/t19_03_down.txt
echo --- delete page 5 (D)
prclick 5 300 300
wait 300
key d
wait 900
state test/out/t19_04_del.txt
echo --- blank page after page 1 (B)
prclick 1 300 300
wait 300
key b
wait 900
state test/out/t19_05_blank.txt
echo --- insert test/insert.pdf after the current page
insertpdf test/insert.pdf
wait 1500
state test/out/t19_06_insert.txt
shotscreen test/out/t19_06_insert.png
echo --- search finds text on the inserted pages
key ctrl+f
type zebrafish
wait 600
state test/out/t19_07_search.txt
key esc
wait 200
echo --- undo insert, blank, delete; redo the delete
key ctrl+z
wait 900
state test/out/t19_08_undo1.txt
key ctrl+z
wait 900
key ctrl+z
wait 900
state test/out/t19_09_undo3.txt
key ctrl+y
wait 900
state test/out/t19_10_redo.txt
echo --- search on a moved page
key ctrl+f
type page 2
wait 600
state test/out/t19_11_search2.txt
key esc
wait 200
echo --- save: a page was deleted, so the whole file is written again
key ctrl+s
wait 2500
state test/out/t19_12_saved.txt
echo --- save as
saveas test/out/e2-copy.pdf
wait 1500
state test/out/t19_13_saveas.txt
shotscreen test/out/t19_13_saveas.png
quit
