Is there a better way to do this? This is a script file using ...

Is there a better way to do this? This is a script file using ...