Hi Jake,
> When I used that script, I had to modify it slightly to get it to
> work with my system. My version is here:
> https://gist.github.com/gatesphere/4692706
Do you remember why you needed to use `%%1` in place of `%%*` ?
The former will only pass the 1st parameter while the 2nd will pass
everything. So when using `%%1` the second and further files or parameters
will be ignored. I didn't come up with a scenario where that is needed or
an improvement, but perhaps I'm missing a use case were it is(?)
Since writing that batch file I notice the association created by the
Python.org installer uses this syntax:
C:\pythonXX\python.exe "%1" %*
This got me curious enough to do some digging.This is what happens on my
machine (Win7 x64; parts omitted for clarity).
-----
::leo.bat
start "leo" /B "b:\o4w\bin\pythonw.exe"
"B:\apps\leo-editor\launchLeo.py" "%*"
usage example and result:
B:\>leo first.leo second.leo
B:\>start "leo" /B "b:\o4w\bin\pythonw.exe"
"B:\apps\leo-editor\launchLeo.py" "first.leo second.leo"
only 2nd workbook opens
-----
::leo.bat
start ... "%1"
usage example and result:
B:\>leo first.leo second.leo
B:\>start ... "first.leo"
only 1st workbook opens
------
::leo.bat
start ... %*
usage example and result:
B:\>leo first.leo second.leo
B:\>start ... first.leo second.leo
both workbooks open
-----
and finally, the python filetype syntax:
::leo.bat
start ... "%1" %*
usage example and result:
leo first.leo second.leo "third with space.leo"
B:\>start /b "Leo" "b:\o4w\bin\pythonw.exe"
"B:\apps\leo-editor\launchLeo.py"
"first.leo" first.leo second.leo "third with space.leo"
All 3 workbooks open. So it seems harmless that the first is listed twice,
though I imagine there would be a performance impact if it were a large leo
file. I don't see a reason for using this syntax though.
more slightly off topic comments in your gist (shortly).
cheers,
-matt
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.