Is there a way within a praatscript to query the path and filename of an object.
I want to save a textgrid to the same file I opened (overwite it)
I was think of something like:
selectObject: n
type_name$ = selected$ ()
file_name$ = some_way_to_query_this..., n
type$ = extractWord$ (type_name$, "")
if type$ == "TextGrid"
runScript: "save.praat", file_name$
endif