On 15/06/2007 13:04, kiri wrote:
I would like to know if there's any way to open session files from the command line. This would be great so one could open SciTE session files from the OS GUI by clicking on it, and this would ease the work with large projects.

The way I do it on Windows, with registry:

; SciTE specific: open a session.
[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\""
@="\"C:\Program Files\USys\AutoHotkey\AutoHotkey.exe\" "C:\\Program Files\\UText\\SciTE\\OpenSciTESession.ahk\" \"%L\""

I use AutoHotkey scripting language, but any other, including WSH ones (there was an example in this mailing list) will do it. The script just double the backslashes in the path (required by the director extension syntax) and run SciTE with the appropriate option:

; Run SciTE with the loadsession option, with path correctly quoted
StringReplace path, 1, \, \\, All
Run %SciTE_Home%\SciTE.exe "-loadsession:%path%"


Another thing I couldn't find in the documentation is how can one set monospace font display to be the default setting when starting the editor or opening files.

See the FAQ...

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to