Debian Codegraph @

docs/manual/initialization_script.html

raw symbols SCIP
1 <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2 <title>initialization script</title>
3 <style>
4 td { padding-left: 5pt; padding-right: 5pt; }
5 th { padding-left: 5pt; padding-right: 5pt; }
6 code { white-space: pre-wrap; }
7 dd { white-space: pre-wrap; }
8 </style>
9 </head><body bgcolor="#FFFFFF">
10
11 <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b>
12 initialization script
13 </b></font></table></table>
14 <p>Your initialization script is a normal <a href="Praat_script.html">Praat script</a> that is run as soon as you start Praat.</p>
15 <p>On Unix or macOS, you create an initialization script by creating a file named <code><font size=+1>praat-startUp</font></code> in the folder <code><font size=+1>/usr/local</font></code>, or putting a file <code><font size=+1>.praat-user-startUp</font></code> or <code><font size=+1>praat-user-startUp</font></code> in your home folder (if you rename the Praat executable, these names have to change as well).</p>
16 <p>If you have more than one of these files, they are run in the above order.</p>
17 <p>On Windows, you create an initialization script by creating a file named <code><font size=+1>praat-user-startUp</font></code> in your home folder, which could be <code><font size=+1>C:\Users\Miep</font></code> if you are Miep.</p>
18 <p>If you have both of these files, they are run in the above order.</p>
19 <h2>Example</h2>
20 <p>If you like to be greeted by your husband when Praat starts up, you could put the following lines in your initialization script:</p>
21 <code> if windows<br></code>
22 <code> Read from file: "C:\Users\Miep\helloMiep.wav"<br></code>
23 <code> elsif macintosh<br></code>
24 <code> Read from file: "/Users/miep/helloMiep.wav"<br></code>
25 <code> else<br></code>
26 <code> Read from file: "/home/miep/helloMiep.wav"<br></code>
27 <code> endif<br></code>
28 <code> Play<br></code>
29 <code> Remove<br></code>
30 <h2>What not to use an initialization script for</h2>
31 <p>You could set preferences like the default font in your initialization script, but these will be automatically remembered between invocations of Praat anyway (in your <a href="preferences_file.html">preferences file</a>), so this would often be superfluous, or indeed confusing.</p>
32 <p>For installing sets of menu commands at start-up you will probably prefer to use <a href="plug-ins.html">plug-ins</a> rather than a single start-up file.</p>
33 <h3>Links to this page</h3>
34 <ul>
35 <li><a href="Add_action_command___.html">Add action command...</a>
36 <li><a href="Add_menu_command___.html">Add menu command...</a>
37 <li><a href="Add_to_dynamic_menu___.html">Add to dynamic menu...</a>
38 <li><a href="Add_to_fixed_menu___.html">Add to fixed menu...</a>
39 <li><a href="Add_to_menu___.html">Add to menu...</a>
40 <li><a href="ButtonEditor.html">ButtonEditor</a>
41 <li><a href="hidden_commands.html">hidden commands</a>
42 </ul>
43 <hr>
44 <address>
45 <p>© Paul Boersma 1997,2004,2006,2014,2015,2020,2023</p>
46 </address>
47 </body>
48 </html>