Using part of project name

Morning.

I’ld like to create invoices with DTPO. Therefore I need an approach to use the first ten digits of the project name when creating the invoice. These first ten digits of the project name are the project number.

I think, this could be realized by Typinator. At the moment I use a Typinator script which, when I type the project/group name as nproj, expands the project/group name to a four digit consecutivly increased project number dash calendar year, two digits, dash editors ID, two digits, followed by the name of the project.

For creating invoices Typinator should take the first ten digits of the project name and prefix a consecutively increased invoice number to make the file name of the invoice. I do know how to create a Typinator script which creates the invoice number. But I do not know, how Typinator can use the first ten digits of the current project name.

Could you give me an advice how to implement this issue?

Thanks in advance and kind regards, Friedrich

Copy the first ten digits from the project number to the clipboard and then get that content from the clipboard via Typinator by using


{clip}

Combine this in an new Typinator expansion with the code for a new Typinator-counter (this time for invoices instead of project numbers) as explained on the German section of this board.

I’ld like to automate exactly these two steps.

Kind regards, Friedrich


{clip}

would be part of the formula of a new Typinator expansion, it ‘automatically’ makes the content of the clipboard part of the expanded result.

I think, what you are looking for is a script, that copies the first 10 digits of a file name to the clipboard. In a second step, when writing the invoice, you type the abbreviation for the Typinator expansion that gets the clipboard content and prefixes the invoice number.

Should you be looking for script, I recommend to post this on the scripting board.