Scripts Menu

Recent scripts submenu provides quick access to two last used scripts (if any)

You can set up to 5 scripts as favorite ones using preferences dialog.

Scripts Dialog

This dialog is designed to create, change, view and execute scripts. To get information how to write a script, press appropriate button.
N.B.! Script name should not contain symbol ";". Scripts will be executed with active directory as parent directory, you can change/view it using corresponding buttons at the bottom of the main window.

How to write a script

From version 0.1.9 PdfTk-QGUI supports scripts, i.e. batch file processing. Version 0.1.9 supports three kinds of scripts: txt2pdf, burst, encrypt. Any script, corresponding to one action, should begin with one of these words and consist of one line. You can write a script that will consist of two or more actions. It will contain corresponding number of lines, each of them beginning with one of three words mentioned above. Each script consists of parts, delimited by space. So there should not be any spaces inside each part. The first part of each script is a keyword: "txt2pdf", "burst" or "encrypt". The second part is "input filename filter". It is simply a wildcard. The list of files in the "active directory" will be filtered according to this wildcard. (About wildcard matching see below) The third part of each script is output filename filter. Is is not a wildcard, which is described below. It supports only one feature: symbol "*" will be replaced with input filename. You can also place output files in a subdirectory. If you want to do so, output filename filter should begin with "/" followed by subdirectory name (it may contain "*" - that means that each file will be placed in it's own subdirectory) followed again by "/" and output filename (which of course may also contain "*").

Wildcard Matching

(taken from QRegExp help) Wildcard matching is much simpler than full regexps and has only four features: For example if we <...> have strings which contain filenames we could identify HTML files with *.html. This will match zero or more characters followed by a dot followed by 'h', 't', 'm' and 'l'.

  1. Txt2Pdf script converts every txt file, that matches input filename wildcard to pdf and saves it according to output filename wildcard. To be valid, the script should consist of 3 parts, delimited by space: "txt2pdf" word, input filename filter and output filename filter.
Используются технологии uCoz