Very often I copy-paste text from a website that I want to save for later reading to a file via Ctrl+V In Dopus. Dopus creates creates a filename with name of "Clipboard Text", "Clipboard Text (1)", "Clipboard Text (2)", etc. - which I then have to rename to make it meaningful for me to find again later. A nice suggestion would be to rather have the filename be the first 20 characters from the clipboard pasted data.
I have tried "Clipboard PASTE AS {clip}" - but it has the problem that it does not work when the clipboard is holding multiple lines of information. It also does not work when the clipboard is holding illegal characters not allowed in a filename at which point it gives an error message.
@script is only for Rename Scripts (although you can abuse them to do other things, in this case it'd just save you from having a .vbs file somewhere, so it's not worth worrying about until the script itself works, at least).
You can use dopusrt.exe to run commands (such as Clipboard PASTE) from outside of Opus (like a .vbs script), but I'm not sure if there is a good way to pass the multi-line clipboard contents to the script via the command-line.
You can get the clipboard in vbscript via some Internet Explorer scripting objects, but they force you to click a confirmation every time you use them, which is a pain if you want to do this a lot.
(By the way, your account is not linked on the forum, so we'll be less likely to answer your questions unless you link it.)
Thanks Leo - per your suggestion I realized I can use dopusrt.exe to pass the filename in from a AutoHotKey script (while keeping the file contents in Clipboard). Here is the AutoHotKey script to create a filename from the first 64 filename-allowed-characters from the clipboard:
^+v::
filename = %Clipboard% ;autotrim leading and trailing whitespaces
StringReplace, filename, filename, `r`n, %A_Space%, All ;replace newlines with spaces
filename := RegExReplace(filename, "[[:blank:]]+", " ") ;remove double spaces
StringReplace, filename, filename, /, -, All
StringReplace, filename, filename, \, -, All
StringReplace, filename, filename, :, -, All
StringReplace, filename, filename, », -, All
StringReplace, filename, filename, ~, -, All
filename := RegExReplace(filename,"[^[:alnum:]\-[:blank:]]+")
StringLeft, filename, filename, 64
MsgBox %filename%
Run, "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Clipboard PASTE AS "%filename%"
VarSetCapacity(filename, 0) ; Free memory
Return