Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Starting and Stopping Epsilon
         . . .
         Sending Files to a Prior Instance
         MS-Windows Integration Features
            Running Epsilon via a Shortcut
            The Open With Epsilon Shell Extension

Previous   Up    Next
MS-Windows Integration Features  Commands by Topic   The Open With Epsilon Shell Extension


Epsilon User's Manual and Reference > Commands by Topic > Starting and Stopping Epsilon > MS-Windows Integration Features >

Running Epsilon via a Shortcut

Epsilon comes with a program, sendeps.exe, that's installed in the directory containing Epsilon's main executable. It provides some flexibility when you create a desktop icon for Epsilon, or use the Send To feature (both of which involve creating a Windows shortcut).

When Epsilon's Windows installer or its configure-epsilon command create a desktop shortcut for Epsilon, or an entry on Explorer's Send To menu, they're set to run this sendeps.exe program instead of Epsilon's main executable. Sendeps will start Epsilon if necessary, or locate an existing copy of Epsilon, and load the files named on its command line.

This is useful because Windows ignores a shortcut's flags (command line settings) when you drop a document on a shortcut, or when you use the Send To feature. (If it used the flags, you could simply create a shortcut to Epsilon's main executable and pass its -add flag. Since it doesn't, sending a file requires a separate program.) Also, Windows sends long file names without quoting them in these cases, which would cause problems if sent directly to Epsilon. (Don't use sendeps.exe for pinned taskbar entries, since those don't have such issues, and will result in Windows showing an extra Epsilon taskbar icon. Pin Epsilon to the taskbar by right-clicking its taskbar icon.)

Sendeps.exe is configured through entries in a lugeps.ini file located in sendeps's directory. Normally you would run the configure-epsilon command to modify this file, but we document its format here for completeness and for special uses.

The lugeps.ini file may have multiple sections, each section name inside square brackets. The section name sendeps uses is taken from the base name of its executable. That means making copies of the sendeps.exe program under different names lets you have multiple Send To or desktop entries that behave differently. The configure-epsilon command makes a copy of sendeps.exe named sendnew.exe, for example, to support certain configuration options.

These are the default settings for lugeps.ini:

[SendEps]
server=Epsilon
topic=Open
ddeflags=
executable=epsilon.exe
runflags=-add -w1
nofilestartnew=1
nofileflags=-w1
usedde=0
senddir=1

Here's how Sendeps uses the above settings. It first looks for an Epsilon server named server using Epsilon's -add protocol. If found, it sends the server a command line consisting of the ddeflags setting, followed by the file name passed on its command line (inside double quotes). If there's no such server running, Sendeps executes a command line built by concatenating the executable name, the runflags, and the quoted file name. If the executable name is a relative pathname, Epsilon searches for it first in the directory containing sendeps.exe, then along your PATH environment variable.

Normally relative file names on the sendeps command line are sent to Epsilon as-is, along with a -dir flag indicating Sendeps's current directory. Set senddir to zero and Sendeps will convert each file name to absolute form itself and omit -dir.

You can tell Sendeps to use DDE instead of its usual -add protocol by setting usedde to 1. In that case it will use the specified topic name.

When you invoke Sendeps without specifying a file name on its command line, its behavior is controlled by the nofilestartnew setting. If nonzero, it starts a new instance of Epsilon. If zero, it brings an existing instance to the top, if there is one, and starts a new instance otherwise. In either case, if it needs to start a new instance, it uses nofileflags on the command line.



Previous   Up    Next
MS-Windows Integration Features  Commands by Topic   The Open With Epsilon Shell Extension


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.