ParticlePosition to text file

Friends i want output like this in text file
Output:
ID       PositionX      PositionY      PositionZ
1           21                12                  16
2           16                41                  23
3           11                8                    19

i made this tiny window without any command.So,now tell me how can i do this ??

You simply would write a little procedure what does the print job and map it to your "export" button. The print function would check the particle count of your object and iterate through all individual particles and read out the positions and print it to your file. Wouldnt be much more than this few lines

$fileId = fopen "c:/exampleFile.txt" "w";
fprint $fileId("ID PositionX PositionY PositionZ\n");
for($i=0;$i<getAttr particleObject.count;$i++)
{
    float $p[] = xform -q -ws -t ("particleObject.pt[" + $i + "]");
    fprint $fileId ($i + " " + $p[0] + " " + $p[1] + " " + $p[2] + "\n");
};
fclose $fileId;

You not neccessarily need to make a procedure out of it but it makes it a lot easier when assigning this script to your button.

Oh thank you very much