I built a Dialog in InDesign script that has any options.
I want to save the settings the user selects in a file (For example in a file named setting.ini) to do not require a re-adjustment in the next run and the same settings are enabled for the Dialog.
Is there such a possibility?
Yes, you can use the label functionality to save any information to any InDesign objects. To save things from dialogs that you want to access the next time that a script is run, it would make most sense to save the info into the app object directly, that way it will be available even after closing and re-starting InDesign (as opposed to saving it into a Document which might not be open the next time the users uses the script).
The general workflow would be something like this:
Now the info is saved in the app itself. Next time you run the script, you can retrieve the information from the label like this:
Now you can proceed and pre-populate the dialog with the properties you have in the
savedSettings
variable.