This page describes how to configure Windows so that right-clicking a J script file (*.ijs) in Windows Explorer will give you the following options:

In addition, for Window 7 and Vista, the appropriate Registry entries are provided so that preview pane in Windows Explorer can display the contents of script files.

Instructions

Windows XP

If you have followed the Windows XP instructions for registering .ijs files, then all you need to do is add a couple of other actions to the J Script File file type.

jao_win.png

Different command line syntax options are as follows:

The names you give the actions are a matter of personal preference. Ditto for which action you decide to make the default (i.e. the action that will be used when you double-click on the file).

Now when you right click on an .ijs file in Explorer, you should have the options to run, load or open it.

Windows 7 & Vista

Unfortunately Microsoft have removed the GUI method of associating custom actions with file types in Windows 7 and Vista, so to accomplish the same thing requires manipulating the Registry. You could do that manually or alternatively you can download and Merge the .reg file below into your Registry (right-click on the file in Windows Explorer and choose Merge).

preview.png

In addition the last two paragraphs of the .reg file below enable the contents of .ijs scripts to be displayed in the Window 7/ Vista Explorer Preview Pane. This can be a very useful way of browsing the contents of scripts.

The .reg file below assumes that you have installed J.602 in C:\Program Files\ (a system install), if you have installed J to different location you will need to edit the paths in the registerIJSfiles.reg file to point to the location of your j.exe file before you Merge it to your Registry.

Obviously all the standard warnings about backing up your Registry etc beforehand probably apply here.

«registerIJSfiles.reg»= Associate actions with .ijs files in Registry
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.ijs]
@="J_script_file"

[HKEY_CLASSES_ROOT\J_script_file]
@="J Script File"

[HKEY_CLASSES_ROOT\J_script_file\shell]

[HKEY_CLASSES_ROOT\J_script_file\shell\open]

[HKEY_CLASSES_ROOT\J_script_file\shell\open\command]
@="\"C:\\program files\\j602\\bin\\j.exe\" -js \"open '%1'\""

[HKEY_CLASSES_ROOT\J_script_file\shell\load]

[HKEY_CLASSES_ROOT\J_script_file\shell\load\command]
@="\"C:\\program files\\j602\\bin\\j.exe\" \"%1\""

[HKEY_CLASSES_ROOT\J_script_file\shell\run]

[HKEY_CLASSES_ROOT\J_script_file\shell\run\command]
@="\"C:\\program files\\j602\\bin\\j.exe\" -jijx \"%1\""

[HKEY_CLASSES_ROOT\J_script_file\ShellEx]

[HKEY_CLASSES_ROOT\J_script_file\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"

Nota Bene

Each script you "open" will start a new copy of J.exe. If you are aware of a way to open several scripts using the same copy of J.exe, please add that information here.

See Also


CategoryLiterate

Guides/Auto Open (last edited 2009-11-08 09:42:19 by RicSherlock)