Automated access to the clipboard (both read and write) is considered to be security issue so there is no way to do it via script alone. The standard workaround is to use a utility called zeroclipboard which uses flash: