[-Contents-] [-Installation-] [-General Info-] [-Main Window-] [-Commands-] [-Menu-] [-Changes-]

Configure Filetypes

7k

You can configure any number of filetypes. A filetype is recognized by the suffix or the contents.
Template for suffix recognition:
.SUFFIX: Description
where SUFFIX is the suffix of the file (i.e. txt, jpg, bmp, rtf ...) and Description is YOUR description of this filetype
Template for content recognition: #position1-value1,position2-value2,...,positionN-valueN: Description
(All values are in Hex, first byte in a file is 0 !)
where positionX is the position inside a file and valueX ist the value at positionX. The sequence to recognize JPEG-Pictures is: '#6-4a,7-46,8-49,9-46,a-0: JPG Pictures' ! This means: Open file, go to position 0x6, check for value 0x4a, got to position 0x7, check for value 0x46 and so on. You will easily understand that this will slow down checking significantly ! This does not work over networks if you are not allowed to WRITE to files. PCOpus does NOT write to any files, this is a system-problem. YOU requested this, enjoy it !
The best way to use this option would be disabling the Content-checking and use double-definitions, i.e. one definition with '.JPG: JPG Pictures' and another one with '#6-4a,7-46,8-49,9-46,a-0: JPG Pictures'. This way you will always have the correct colors for files with the correct suffix and you can also be sure that ALWAYS the correct program is started when a file of the specified type is double-clicked ! This does not work inside archives.
For example: defining a command for each file ending in .txt (an ASCII Textfile) would launch the defined program each time you doubleclick on a file ending in .txt (pressing return when the cursur is over it does the same). You can define the colour in which this filetype is displayed. Clicking 'Find File' opens a standard Windows requester where you can select the file you want to apply to this specific filetype. If you want to apply a program to this filetype that is already applied to another filetype you can click on the drop down box just below the filetype list.
From PCOpus 1.51 on you may specify more than one command for a filetype. It is now possible to define a command for

LL, LR and RL should be clear to understand.
SideChange means: You may click on a file in a window, quickly move to the inactive window and click again (left or right)
You can also use most internal commands for the filetypes. Please look in the drop-down list for available commands.
Two special filetypes exist, too. One is *!f. This means all files. This filetype is only activated if no other filetype was found fitting. Defining the *!f filetype with *!WinStandard in the LL field is the same as using <Windows Standard> in previous versions of PCOpus. The other one is *!d. This means all directories. The settings here are used when any directory is selected with LL, LR, RL, L-c-L and L-c-R. The settings in LL are ignored, double-clicking always enters the directory. I recommend defining L-c-L with *!DisplayDirInOtherWindow.
If you want to have no command executed when a certain combination is clicked, define *!*NoCommand for this function. PCOpus will not look for the command defined in *!f then.
Behind each line is a little checkbutton. Check it if you use commands like
C:\WINDOWS\Sndrec32.exe /play /close /embedding
for playing WAV files for example. If the checkbutton is on, VB internal routines are used instead of Windows calls. You can use any options for the command called and you can use programs with names containing spaces this way. (Leave the checkbutton off when using programs with spaces in the name.) Try it out if you have problems, the only thing you may get if the operation fails is a little requester. You should leave the checkbuttons off until you experience problems.
It is possible to use buttons in filetype definition. This is especially useful if you want to use more complex functions for a filetype. Just define a button with the needed commands and note or remember the number of this button. This number can be seen in the button configuration after double clicking on this button. A '.5' means, that it is a right mouse-button function. Now enter a '#' followed by this number into the gadget in filetype definition, for example #93 or #12.5. This button will be called if you perform the necessary click-combination on this filetype.

Please take care. Since the possibilites are now really vast, the dangers have grown, too. Defining too much commands for filetypes can lead to confusion. You have been warned ! It is now even possible to define 'Delete' on a double-click !

Some internal settings are available for filetypes:

Buttons available: