Filename Length

Discussion, questions and support.
Post Reply
gsechler
Posts: 6
Joined: Dec 7th, ’18, 19:38

Post by gsechler » Mar 28th, ’20, 17:27

I frequently send files through a website that only allows 40 characters in the filename description. I'm trying to build a script that will take a filename from my clipboard and trim it down to 40 characters. I've been experimenting with StringTrimRight, but I can't figure out how to add-in variables so that it'll automatically read what's on my clipboard or, at the least, popup a dialog box in which I can drop my text. Any hints or suggestions? Would be greatly appreciated!
User avatar
Marko
Posts: 1718
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Mar 29th, ’20, 09:12

This will trim the clipboard string to 40 characters:

Code: Select all

Clipboard:=SubStr(Clipboard,1,40)
Post Reply