Sorry it's taken me so long to get back to you--the past couple of
weeks have been crazy. Thanks for the script, Philippe--I had to
make a couple of small tweaks and actually set the environmental
variable myself, but otherwise it works great. Final version on my end appears below, if anyone is interested. Again, thanks a lot for the script--it'll be a great time saver for me.
Chad Burrus
Chad Burrus
-----Original Message-----
Date: Tue, 12 Sep 2006 10:39:29 +0200
From: Philippe Lhoste <PhiLho@GMX.net>
Subject: [scite] Re: Loading Sessions From Commandline
To: scite[EMAIL PROTECTED]
Message-ID: <ee5rnn$3mc$[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
JScript (WSH) version:
// OpenSciTESession.js
// Run SciTE with the loadsession option, with path correctly quoted
if (WScript.Arguments.count() == 1)
{
var path = WScript.Arguments.Item(0);
path = path.replace(/\\/g, '\\\\');
var shell = WScript.CreateObject("WScript.Shell");
var sysEnv = shell.Environment("SYSTEM");
var sciteHome = sysEnv("SciTE_HOME");
shell.Exec(sciteHome + "\\SciTE.exe \"-loadsession:" + path + "\"");
}
# SciTEses.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.ses]
@="SciTESessionFile"
[HKEY_CLASSES_ROOT\SciTESessionFile]
; English
@="SciTE Session File"
; French
@="Session SciTE"
[HKEY_CLASSES_ROOT\SciTESessionFile\DefaultIcon]
@="C:\\Program Files\\UText\\SciTE\\SciTE.exe"
[HKEY_CLASSES_ROOT\SciTESessionFile\shell\open\command]
; The following doesn't work because backslashes in path must be escaped
#~ @="\"C:\\Program Files\\UText\\SciTE\\SciTE.exe\" \"-loadsession:%L\""
@="CScript.exe \"C:\\Program Files\\UText\\SciTE\\OpenSciTESession.js\"
\"%L\""
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
_______________________________________________ Scite-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scite-interest
