1@chapter Getting started 2 3@section Getting started 4@cindex Getting started 5To get the first feel of Xnee some simple examples are presented. 6 7@subsection Simple replay 8Start a terminal emulator (e.g xterm) and then start Xnee, 9@example 10 @code{cnee --replay --file example1.xnr &} 11@end example 12....dont forget '&'. 13The file example1.xnr contains keyboard events recorded during 14development of this manual. When replayed you'll see what was typed and of 15course more important you'll get i first glimpse of Xnee and its capabilities. 16For information on where to find the example files, see below. 17 18@subsection Simple recording of Key presses 19We move on to a (very) simple recording session. 20Start a terminal emulator (e.g xterm) and your favorite editor. 21Move the pointer to one of the terminal windows and start Xnee. 22@example 23 @code{cnee --record -o example2.xnr --device-event-range 2-3 \} 24 @code{--time 5 --events-to-record 20} 25@end example 26Move the pointer to the editor and get focus (e.g click the 27window frame). After 5 seconds you can type whatever you want to record 28(20 press- and relase events of the keyboard are recorded). We are done 29and you have recorded your first session! Leave the desktop as it 30is and go forward to the next example. 31 32 33 34@subsection Simple replaying of your recorded file 35Start one terminal emulator (e.g xterm). 36Let Xnee repeat the stuff you did in the example above. 37Undo all changes in the editor that was made in the previous example. 38Move the pointer to one of the terminal windows and start Xnee. 39@example 40 @code{cnee --replay -f example2.xnr --time 5} 41@end example 42Move the pointer to the editor and get focus (e.g click the 43window frame). After 5 seconds you will see your typings in the example 44above being repeated. 45 46@subsection Simple recording of mouse motions 47We move on to another simple recording session. 48Start a terminal emulator (e.g xterm). 49Move the pointer to the terminal window and start Xnee. 50@example 51 @code{cnee --record -o example3.xnr --device-event-range 5-6 \} 52 @code{--time 5 --events-to-record 20} 53@end example 54After 5 seconds you can move the pointer around (20 motion events are recorded). 55 56@subsection Simple replaying of your recorded file 57Let Xnee repeat the stuff you did in the example above.. 58Move the pointer to the terminal window and start Xnee. 59@example 60 @code{cnee --replay -f example3.xnr --time 5} 61@end example 62After 5 seconds you will see your mouse motions in the example above being 63repplayed. 64 65@subsection Simple retyping of a text file 66Let Xnee retype (type again) the text in a text file. 67Move the pointer to the terminal window and create a text file containing 68the command @code{ls -l}. 69@example 70 @code{echo "ls -l" > ./mytext.txt} 71@end example 72And after that you start Xnee. 73@example 74 @code{cnee --retype-file ./mytext.txt --time 5} 75@end example 76After 5 seconds you will see Xnee type @code{ls -l}, which probably will 77list the files in the current directory. 78 79@subsection Example Xnee Session files 80@cindex Example Xnee Session files 81The example file above (example1.xnr) is a session file that has been 82delivered with the sources (allthough not installed), rpm and with the 83Xnee Documentation Package. The file(s) can be found: 84@multitable @columnfractions .30 .30 .30 85@item 86@tab @b{Distribution} 87@tab @b{Location} 88 89@item 90@tab RPM 91@tab /usr/lib/xnee/session 92 93@item 94@tab Source 95@tab ./sessions/ 96 97@item 98@tab Document Package 99@tab ./sessions/ 100@end multitable 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122