Do a search in the manual (F1) for filem and you'll get an explanation of how to make Opus write the filenames to a temporary file for you, no @script required.
By the way, @script is currently only supported when renaming. You can "abuse" it to do things other than renaming, though. See here:
[[OBSOLETE] "Abusing" Rename Scripts to do other things with file info)