0

It is possible to supply batch commands directly with the -b flag, but if the commands become very long, this is no longer an option. Is there a way to give the path to an .scm script that was written to a file, without having to move the file into the scripts directory?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
2080
  • 1,223
  • 1
  • 14
  • 37

1 Answers1

1

No as far as I know. What you give in the -b flag is a Scheme statement, which implies your function has already been loaded by the script executor process. You can of course add more directories that are searched for scripts using Edit>Preferences>Folders>Scripts.

If you write your script in Python the problem is a bit different since you can alter the Python path before loading the script code but the command line remains a bit long.

xenoid
  • 8,396
  • 3
  • 23
  • 49
  • Okay, I added a file exporter to my scm generator https://github.com/void4/PyGimpBatchGen/blob/master/gimpscm.py#L104 After the file is written to the scripts directory, I execute the script like a normal batch file by using the defined function name. – 2080 Mar 20 '19 at 09:27