Changing pixel format without UI

Hi there. I’m new to aseprite scripting and new to posting on forums at all. I would just like to know how to change the pixel format to indexed without it bringing up a ui.
I’ve tried adding ui = false to the parameters without success. I also figured if i filled out every parameter, it wouldn’t need the ui to pop up since there were no questions to ask, but that didn’t work either. Please help, thank you.

welcome, Rezza20. it seems like you shouldn’t need ui parameter at all. i just tried example from api/ at main · aseprite/api · GitHub in v1.3beta21 and it didn’t show ui.