Automatically Printing a trend at Midnight

I am trying to get a trend to automatically print at midnight. I would like to set this up as a gateway script so that the HMI does not have open to the window every night at midnight.

I tried to setup the gateway script to automatically print, but apparently the gateway scripts are not user interactive, and I am unable to get it working.

Is there any way to setup a gateway script to open a window, then automatically print out a trend on a midnight trigger?

the only way you will be able to do this is with a client and a client script.

Just as diat150 said, you will need to have an open client and a client timer or tag change script to do this.

Why not have the gateway open a new client every day at midnight, have it load and print the trend, then close the client?