How to: Preview APL script files in Windows Explorer

The Dyalog "Knowledgebase". This forum is read-only
Forum rules
The FAQ is a read-only forum which is in general updated only by employees of Dyalog Ltd. It replaces the FAQ page which existed under http://www.dyalog.com. Rather than rejecting other posts to this forum, such posts will be put in a moderation queue, and moved to a more appropriate forum.

How to: Preview APL script files in Windows Explorer

Postby Adam|Dyalog on Fri Jun 26, 2015 2:59 pm

ScriptPreview.png
Script file for SALT's parser being previewed in Windows Explorer
It is possible to view the contents of .dyalog and .dyapp script files in the Preview pane of Windows Explorer. To open the Preview pane:
  • Windows 7: Select Preview pane under the menu item Layout on Explorer’s Organize menu.
  • Windows 8, 8.1, and 10: Click the Preview button in the Panes section of the View tab.
Previewing APL files is enabled by telling Windows that the files are plain text files. Explorer uses Notepad’s font settings for rendering the text files, so to see APL code formatted correctly you need to either set the appropriate registry values (thereby changing Notepad’s font settings) or make the appropriate changes in Notepad (after closing Notepad, all subsequent previews will render with the new settings).

Having Dyalog installed is not required, but you must be running at least Windows 7 SP1 or Windows Server 2008 R2 SP1. You also need the APL385 Unicode font for proper formatting. It is installed with Dyalog (even the Classic version), but can also be downloaded.

An upcoming set of installers for version 14.1 will automatically add the registry values, but even if you already have Dyalog installed you can easily enable previewing by doing the following:
  1. Click SELECT ALL in the CODE box below, then press Ctrl+C.
  2. Open Notepad, then press Ctrl+V.
  3. If you want keep your current font settings, remove the last four lines.
  4. Save the file as preview.reg.
  5. Find the file you just saved in Windows Explorer and double-click on it.
  6. Confirm at the dialog box, then close the confirmation message.
Tip: To change the font size, click in the Preview pane, then hold Ctrl while scrolling. You can also change the font size from within Notepad.

Code: Select all
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.dyalog]
@="dyalogfile"
"PerceivedType"="text"

[HKEY_CLASSES_ROOT\.dyapp]
@="dyappfile"
"PerceivedType"="text"

; OPTIONAL LINES:

[HKEY_CURRENT_USER\Software\Microsoft\Notepad]
"lfWeight"=dword:00000190
"lfItalic"=dword:00000000
"lfFaceName"="APL385 Unicode"
User avatar
Adam|Dyalog
 
Posts: 135
Joined: Thu Jun 25, 2015 1:13 pm

Return to Frequently Asked Questions (FAQ)

Who is online

Users browsing this forum: No registered users and 1 guest