e69162ea758333b8cbda8d19d2c0b7b71d305e81
[xboard.git] / winboard / install / files / root / WinBoard / doc / shortcuts.html
1 <html>\r
2 <header>\r
3 <title>WGP: Shortcuts for WinBoard</title>\r
4 </header>\r
5 <body>\r
6 <table cellpadding="20"><tr><td>\r
7 <h1>The WinBoard Gold Pack 4.4.0</h1>\r
8 <h2>For the ultimate WinBoard experience!</h2>\r
9 </td><td>\r
10 <img src="mini.gif">\r
11 </td></tr></table>\r
12 <h3>Customizing WinBoard through Shortcuts</h3>\r
13 <p>\r
14 The most convenient way to run invoke WinBoard is usually through PSWBTM,\r
15 as this combines an easy way to select the engine with a large choice of engines.\r
16 A viable alternative for things you do very often \r
17 (e.g. play on FICS, or play your own engine on ICC)\r
18 is to use a shortcut.\r
19 Such a shortcut hardly offers any flexibility, as it always starts WinBoard with exactly\r
20 the same combination of options.\r
21 But it does allow you to start this combination with a single mouse click,\r
22 which can be convenient for something you do frequently.\r
23 And the WinBoard menus offer you a possibility to tailor some settings later.\r
24 </p><p>\r
25 If you browse to the WinBoard directory of this package (~\WinBoard),\r
26 starting from "My Computer" on the desk top,\r
27 You will see a number of black-knight icons.\r
28 Except for the one marked "winboard" these are all shortcuts\r
29 (recognizable from the small arrow in their lower left).\r
30 They were defined as examples for how shortcuts can be used to ease some common tasks.\r
31 </p><p>\r
32 A good example to look how this works at is the "PGN viewer" shortcut.\r
33 Double-click this, and you will see WinBoard pop up.\r
34 Only the WinBoard main and move-history window will be there.\r
35 Compare this to what you get when you click the winboard icon itself (i.e. not a shotcut):\r
36 this will pop up the start-up dialog first, where you would have to tick that you want\r
37 to use WinBoard to view or edit games only, after which it would come up in the default mode,\r
38 with game history, engine output and evaluation graph all open up.\r
39 (Unless you changed this default after downloading.)\r
40 So to get into the same mode as was pre-programmed in the "PGN Viewer" shortcut,\r
41 you would first have to close these auxiiary windows (in the "Mode" menu). \r
42 So the shortcut does save quite some effort.\r
43 </p><p>\r
44 In a shortcut you can include any command-line options with the command that invokes WinBoard\r
45 (in the target field that you see when you right-click the shortcut, and select "properties").\r
46 The shortcuts in this package are all based on the use of "indirection" file arguments.\r
47 That means that the actual arguments for, say, the "PGN Viewer" icon,\r
48 are collected into a file "viewer.ini".\r
49 The only option on the command-line in the shortcut is then "@viewer".\r
50 Such a name preceded by a '@' sign is interpreted by WinBoard as the name of an .ini file\r
51 (in this case viewer.ini), which is then read to get the actual option settings.\r
52 This allows for far more options than can be put in the target line of the shortcut,\r
53 and allows you to easily modify the options with a text editor like NotePad,\r
54 rather than in the cramped confines of the shortcut properties dialog.\r
55 </p><p>\r
56 So when you want to change the settings of the shortcuts,\r
57 you only have to change the contents of the corresponding .ini file.\r
58 The shortcuts themselves only contain\r
59 </p>\r
60 ~\WinBoard\winboard.exe @INIFILENAME\r
61 <p>\r
62 in their target field, \r
63 where the twiddle stands for the path where you installed the Gold Pack.\r
64 (Windows XP adapts this automatically, first time you use the shortcut.)\r
65 And this can always stay that way.\r
66 (Note that Windows XP and Vista do not show you the "@INIFILENAME" in the target field, \r
67 when you open its properties dialog, which is a bit confusing.)\r
68 </p>\r
69 <h3>Changing the Shortcut Settings</h3>\r
70 <p>\r
71 There is thus no reason to ever touch the shortcuts themselves.\r
72 All you have to do is to edit or replace the corresponding.ini file.\r
73 For instance, for the shortcut to play against Fairy-Max,\r
74 the settingsfile "fairy.ini" contains:\r
75 </p>\r
76 <pre>\r
77 ;\r
78 ; parameters for playing against an engine\r
79 ;\r
80 /cp\r
81 /firstChessProgram="fmax 22"\r
82 /firstDirectory="../Fairy-Max"\r
83 /secondChessProgram="fmax 22"\r
84 /secondDirectory="../Fairy-Max"\r
85 ;\r
86 ;\r
87 ; define window layout\r
88 ;\r
89 /autoLogo=true\r
90 /moveHistoryUp=true\r
91 /evalGraphUp=false\r
92 /engineOutputUp=false\r
93 /hideThinkingFromHuman=true\r
94 ;\r
95 ; define window positions\r
96 ;\r
97 /winWidth=426\r
98 /winHeight=539\r
99 /moveHistoryX=426\r
100 /moveHistoryY=0\r
101 /moveHistoryW=250\r
102 /moveHistoryH=539\r
103 ;\r
104 ;\r
105 ; prevent these settings from becoming default\r
106\r
107 /saveSettingsOnExit=false</pre>\r
108 <p>\r
109 One thing that is apparent is that a .ini file can contain "comments"\r
110 describing what the options do, in lines starting with a semicolon.\r
111 From top to bottom, the options tell WinBoard that we want it \r
112 to run a Chess program (so it skips the startup dialog),\r
113 which one, and where to find it.\r
114 Note that WinBoard always wants to have two Chess programs in this mode,\r
115 so we give it the same twice.\r
116 (The second program is only used when you select Two-Machines Mode.)\r
117 In the next section we tell WinBoard that it should try to find logos\r
118 to display with the players,\r
119 that of the three auxiliary windows only the move history should be open,\r
120 and that the Human opponent should not be alowed to see what the engine\r
121 is thinking.\r
122 </p><p>\r
123 Then follows a section which describes exactly where to locate the windows,\r
124 in this case only the move-history window.\r
125 The position of this is given (in pixels) compared to the position of\r
126 the main window.\r
127 Note it does not specify where to position the main window,\r
128 or what boardSize to use.\r
129 So for this the default value will be used.\r
130 (Usually what was used last time, as remembered in the winboard.ini file.)\r
131 For reference, though, the width and height of the main window for\r
132 which the position information on the other windows refers,\r
133 is mentioned first, as /winWidth and /winHeight.\r
134 This allows WinBoard to conclude at startup that the move-history window\r
135 was touching the main window on the right edge \r
136 (since winWidth = moveHistoryX).\r
137 So that it can retain this attachment if we start up WinBoard with\r
138 a main window of a different width.\r
139 (E.g. because we are playing Gothic Chess on a 10x8 board.)\r
140 </p><p>\r
141 At the bottom there is an option that says all this should not be copied \r
142 to the win      board.ini file automatically.\r
143 After all, because these settings are collected in a shortcut,\r
144 you can summon them at the click of a mouse.\r
145 So there is no reason to make them disturb the carefuly chosen settings \r
146 of your previous session,\r
147 which might take you a lot of effort to reproduce.\r
148 </p><p>\r
149 OK, that was pretty nasty, especially the coordinates part.\r
150 You don't want to calculate coordinates by hand, and find out by trial and\r
151 error what looks nice.\r
152 A more convenient way of adjusting this, \r
153 is to start WinBoard not through a shortcut, but through the startup dialog,\r
154 and then drag and size the windows where you want them \r
155 (or close them if you don't want them).\r
156 You then save the settings in winboard.ini\r
157 (usually done automatically, when you close WinBoard,\r
158 but you can do it also with the "Options -> Save Settings Now" menu).\r
159 Now you can open winboard.ini with the text editor,\r
160 and at the end you will see all the coordinates of the windows as\r
161 you just layed them out.\r
162 Simply copy this information (starting with the /winWidth parameter)\r
163 to the .ini file of the shortcut you are customizing.\r
164 </p>\r
165 <h3>Making a Shortcut from Scratch</h3>\r
166 <p>\r
167 If you want to create an entirely new shortcut, \r
168 e.g. for a task you commonly perform, but which was not delivered with this package,\r
169 you can use the following procedure:\r
170 </p><p>\r
171 First start up WinBoard, and bring it in exactly the state you would want it\r
172 to start up in through the shortcut.\r
173 Then save the settings on the winboard.ini file,\r
174 make a copy of winboard.ini, and rename that copy to "MyShortcut.ini" (say).\r
175 Then open this MyShortcut.ini in NotePad (usually by double-left-clicking it).\r
176 Now you can add option settings to it which are normally not remembered\r
177 from session to session (because they are not saved in winboard.ini),\r
178 such as the variant (e.g. /variant=fischerandom),\r
179 or the chess program and its folder (e.g. /fcp=Fruit /fd="..\Fruit" /fUCI).\r
180 </p><p>\r
181 Right-click the "winboard" knight icon (which is not a shortcut),\r
182 and select "Make Shortcut" from the popup menu.\r
183 Change the name of the newly appearing shortcut to "MyShortcut".\r
184 Then right-click this shortcut, and select "Propeties".\r
185 The text in the "target" field of the popup will now just be the name of the winboard.exe.\r
186 Click this text at the end to put the cursor there (posibly with help of the arrow keys).\r
187 Then add to this line " @MyShortcut.ini", so the line becomes:\r
188 </p>\r
189 ~\WinBoard\winboard.exe @MyShortcut.ini\r
190 <p>\r
191 and click "OK". This completes the process.\r
192 </p><p>\r
193 This is pretty much all that can be said about how to mak shortcuts;\r
194 the main problem is to figure out what the options are that do what you want done.\r
195 Looking in the winboard.ini file often can provide inspiration, and when all else fails,\r
196 as a final resort, you can read the manual!\r
197 </p>\r
198 \r
199 </body>\r
200 </html>