[Date Prev][Date Next][Subject Prev][Subject Next][Date Index][Subject Index]

Re: Keyboard in XyScript



Harry and Fred,

> ... manually run startup.xpl . I also am having to do that,
> probably because I don't have the syntax of the launch right. 

Here's how it works -- and how to avoid pitfalls. When XyScript starts up, it takes the current
working directory (CWD) from the operating system. If you start it from a command prompt, it's the
CWD of the command prompt. If you start it from a shortcut, it's the "Start in" directory
specified in Properties (or the equivalent in macOS/Linux). The CWD may bear no relation to the
XyScript program directory where your configuration files live, so if you use relative paths (or
omit paths) in startup.xpl, it may not find your config files and you'll end up with default
settings.

The solutions are obvious. If you start XyScript from a shortcut, make sure the "Start in"
directory is the directory with xyscript.exe. If you launch from a command prompt, be sure to ChDir
to the directory with xyscript.exe before you launch. But here's the best solution of all: put `cd
$XSDIR` as the first line of your startup.xpl ($XSDIR points to the directory with xyscript.exe).
You can then omit paths in the balance of startup.xpl, or resolve relative paths against $XSDIR. The
Reference and User Manual will have guidance to this effect in the forthcoming new release.

By the way, the CD command in XyScript works like CD/D in Windows. If you include a drive letter in
the path, CD makes it the current drive before switching to the specified directory.

I hope this helps.

-- 
Carl Distefano
cld@xxxxxxxxxx