-- batch_scr_to_gif.lua
-- Produce gif files from a folder containing screenshot and snapshot files
-- Mark Incley 26.05.2022

srcfolder = [[C:\my_scr_folder]]
for inpath in dir(srcfolder) do
	if inks.get_file_class(inpath) == inks.file_class.snapshot or inks.get_file_class(inpath) == inks.file_class.screenshot then
		lresult = inks.load(inpath)
		if lresult == inks.status.ok then
			outpath = inks.replace_extension(inpath, ".gif")
			inks.save_gif(outpath, true)	-- 2nd parameter is whether to include border
		end
	end
end
