Options - File Associations
These options allow you to create File Associations for AQT for a number of different file types.
When you create a File Association, there are two modes in which the File Association is created:
File Association
When this is checked, an Open with AQT association is created for the file type. When you right-click a file of this type in Windows Explorer, an Open with AQT option will appear in the drop-down list. Click on this to open the file in AQT.
You can remove the File Association by un-checking the box.
Default
When this is select, AQT becomes the default application for that file type. When this is done:
- you can open the file in AQT by double-clicking the file in Windows Explorer
- the AQT icon will be displayed with the files
- for Chart files, the file-type description is set to "AQT Chart File"
These settings are removed when the Default box is un-checked.
Some Notes
- Clicking on File Association is "harmless" as it will just add another file association for the file type. This will be removed when you de-select this option. By contrast, clicking on Default will override your existing default file association and icon for the file type. This cannot be undone by de-selecting Default, as the original settings will not be re-established. Use Default with caution if you have an existing file association for the file type.
- You should not set Default for MS Access or Excel files if you have MS Access or MS Excel installed on your PC. However it is OK to set a File Association for these.
- You may need Administrator privileges to create File Associations.
What Happens when you open a file?
This depends on the file type:
Some Technical Notes
File Associations are created by adding some entries into the Windows Registry (HKEY_CLASSES_ROOT). File Associations are very complicated, as there are a number of different ways these can be set up in the registry.
AQT uses a relatively simple way of setting up File Associations. This is shown in the image below. Note that other applications may set up their File Associations in a different way. If you have other applications with File Associations on the same file-types as AQT, they may do it in a way which is not compatible with AQT. The result is that you may not see the File Association for AQT or the other application.
When the File Association button is checked, the following entries are created.
- .xcf is the entry for the file type. This points to the xcf entry
- the xcf entry must have a shell entry. There can be multiple entries underneath shell. Each of these entries gives an action for the file type. In this example, there is only one entry (AQT).
- the value for the AQT entry gives the Title for that entry ("Open with AQT"). You see this when you right-click a file in Windows Explorer.
- the AQT entry has a command sub-entry. This gives the command that is used to start AQT.
When Default is checked, the following steps are also done:
- the shell entry is given a value of "AQT". This specifies which of the sub-entries is the default action for the file type.
- the DefaultIcon entry is created. This specifies the icon to be used to represent files of this type.
- the xcf entry is given a value of "AQT Chart File". This is description of the file type in Windows Explorer.
Command String
Except for SQL files, the command string to open a file with AQT is:
aqt "%1"
where aqt is the fully-qualified name of the aqt executable.
For SQL files, starting AQT in the above way will run the SQL file as a batch script; AQT will appear not to start. To open the SQL for editing (eg. in the Run SQL window), the following command is used :
aqt -e "%1"