GetSaveFile() not saving file

Hello, for some reason, when I utilise the GetSaveFile() function, after clicking “Save”, the file isn’t actually saved. No error messages, nothing, but no file is created. Is there something I’m missing?

Ah, and when I specify filetypes=".glyphs", an error pops up claiming that “the save file operation failed to connect to the open and save panel service”.

The GetSaveFile is not supposed to save anything. It will ask the user for a file location and return it. Then you take that path and do whatever you like, like saving some data.

Then I misunderstood. I was confused, as there’s a “Save” button. What function would I call in order to get a file-saving dialogue?

That function should open one.
What are you trying to save?

I have a script which modifies a currently open .glyphs file, my intention is to save the modified version as a new file instead of overwriting the old version.




oldFilePath = Font.parent.filePath
filePath = GetSaveFile(ProposedFileName=oldFilePath, filetypes="glyphs")
if filePath is not None:

That will save the file but not change the documents url. So hitting Cmd+S later, will write to the original file. I fixed that.