I want to open Save Dialog with python script to save a text file. How can I do this?
Tried this but it doesn’t work:
cmd = getCommand()
cmd.dialogSave("", False)
I want to open Save Dialog with python script to save a text file. How can I do this?
Tried this but it doesn’t work:
cmd = getCommand()
cmd.dialogSave("", False)
Hi Fredrik,
here is an example:
cmdSave = getApplication().findCommand(“dialogSaveFile”)
uri = “”
ok = True
filter = “XML file (.xml)|.xml”
cmdSave .execute(uri,ok,filter,‘Choose File to save layout properties into’)
if cmdSave .Param_2:
uri = cmdSave .Param_1
uri = uri[8:len(uri)]
…
else:
print “No file selected for saving, aborting command”
br/Ralle
Excellent, thanks Ralle