You'll need a script step such as:
Set Variable [$Dummy ; value: AppendtoFile (
You don't care about the value of $Dummy unless the function is set up to return a code that tells you something useful such as whether or not it successfully created the file. (File permissions can block creating the file and the file path can be invalid.) You'll need to check the documentation provided by the developer to determine if that happens or not.
You'll need to replace filepath with the filepath to the location where you want to create this file. There are a number of functions in FileMaker that can help you compute a path, such as a path to the desktop or documents folders and you can simply specify the full path in quotes here in place of "filepath". Then the second paramter, texttoWrite will need to be replaced by either the text you want in the file in quotes or a reference to a field that contains that text.
hey bud one last question that worked perfect just if you have any ideas on if theres a way to add to the first line of the file instead of the last file with this function,
bascily im exporting a .csv with a script and this function is done after the csv is created to add a line of text saying "add WHS" to the csv but it only adds it to the last line of the file and i kinda need it there before the csv starts
cheers in advance :)
You are dealing with a plug in that you have not even named. You'll need to check with your plug in developer and any documentation they have provided to see if there is any way to do that.
Chances are that you would need to import that text into a table, put the data that you want to put in a record in the same table. Sort your records to put the added row first and then export. And that assumes facts about the format of your data that may not match what you actually have.