title: How to get or save the pitch listing in praat using scripting
body: <p>I am trying to use scripting in praat to either save or write to a file with the values given from using "Pitch Listing" under "Pitch". This is my code for the script so far: </p>
  
  <pre><code>selectObject: 1
  View &amp; Edit
  editor: 1
      Select: 0.0, 10000
      Pitch listing
      p$ = Get pitch
      fileappend pitch123.txt 'p$'
  </code></pre>
  
  <p>This code only returns the mean for the sound file and I am wondering if there is a way to avoid getting small chunks of the file and getting the average pitch and instead being able to get the data given the way praat does it like so :</p>
  
  <pre><code>Time_s   F0_Hz
  0.254558   125.982312
  0.264558   127.975510
  0.274558   123.010164
  0.284558   120.761760
  0.294558   119.652539
  0.304558   118.916850
  </code></pre>
  
  <p>Even just being able to save the file that pops up from "Pitch Listing" would work. Any help is appreciated. Thanks!</p>