When I try to manipulate the contents of a text layer via scripting and I don't have the needed font installed, Photoshop opens a dialog asking me:

When this happens, my script stops running until I click on Ok. How can I prevent this dialog from appearing?
Thanks in advance.