Thanks for the quick reply. Very helpful.
I prefer to open .leo file by selecting them from explorer. To enable
me to change which leo branch is envoked I implemented the following
two batch files:
Leo.bat - Executed when a .leo file is opened (double-clicked)
Update the "cd" command in the file to
point to your Python directory
Associate the Leo.bat to your .leo files by:
Right click on on a .leo file in explorer
select "Open with" from the pop-up menu
select "Choose program..."
browse to and select your Leo.bat file
LeoSet-???.bat - Executed to set the Leo branch to use
Replace "???" with the name of the branch.
Change the echo command to your path to leo.py
The LeoSet-???.bat files create a c:\LeoExePath.txt file to store the
path to the selected branch. The Leo.bat file reads from the c:
\LeoExePath.txt file to build the python command line. LeoExePath.txt
is just a substitute for setting and reading an environment variable.
Environment variables are difficult to do in Windows XP.
The batch files should contain the following commands:
Leo.bat (6 lines)
-------
@echo off
rem Get Leo source to execute (Set by LeoSet-xxx.bat)
set /p LeoExe= < C:\LeoExePath.txt
echo Leo: %LeoExe%
cd "C:\Program Files\Python"
cmd /C pythonw "%LeoExe%" %1
LeoSet-???.bat (2 lines)
--------------
Rem Specify which Leo source to execute (used by Leo.bat)
echo C:\Program Files\_Progs\Leo\src\leo.py > c:\LeoExePath.txt
Double click on a LeoSet-???.bat file or execute it from a command
line to set the Leo branch to use. Double click on a .Leo file to
open it in Leo using the branch. Be sure to associate the Leo.bat
files to the '.leo' extension as described above.
Note: Unfortunately, the Leo.bat file leaves a dos command window
open. Just click on the windows close icon to close it. Anybody know
how to have it automatically close?
Regards,
TL
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---