I know I can jump to a bookmark in a LO text document from a LO calc document using a hyperlink to a URL like file:////filename.odt#bookmark
But I need to do other stuff as well, and there are thousands of such hyperlinks, so instead I hyperlinked to a target file that is associated with a .bat file. The .bat file in turn parses the filename passed to it by the hyperlink, stores various text using “set var=value” statements, and does some other command line stuff; so far so good.
But near the end of this process I need to open the .odt file, and jump to a place determined some of the already-known text or bookmark. But I can find no useful command line switches or any other way to achieve this.
I wasted days not knowing that I need to use the control key to click the hyperlink, so this time as I head down that same path again, I thought it might be more prudent to ask about this problem. All ideas would be appreciated.
In case it’s relevant, the .bat file is…
set WPth=%1%
set WPth=%WPth:"=%
set WPth=%WPth:~2,-5%
c:
set FNam=%WPth:~-8%
set WPth=%WPth:~0,-8%
cd %WPth%
del .bak !a. !b.* !c.* !m.*
copy %1% !a.mid
MidiCopy -tracks !a.mid > !a.txt
copy !mute.txt !m.txt
d !a.txt !m.txt -lstrip.mac
miditrim !b.mid !c.mid
“c:\Program Files\LibreOffice 4.0\program\swriter.exe” !c.mid !Lyrics.odt#%FNam%
“c:\Program Files\Foobar2000\Foobar2000.exe” !c.mid
The end of the 2nd last line stuffs up (obviously) because it doesn’t like the #%FNam% on the end (borrowed from hyperlink format in a vain attempt). Midicopy.exe, d.exe, miditrim.exe are 16 bit DOS progs for which I don’t have 32 bit replacements. The purpose of all this is so I can click in one place in my master music list to both play the relevant .mid file and display the relevant lyrics (which are all in one big .odt file). Also, !mute.txt contains a list of MIDI track names corresponding to instruments that will be played live (at least the lead vocals, and often also some harmonies, backup vocals, and maybe bass, drums, keyboards and/or guitars). The little DOS programs strip out all of these parts before playing the file, regardless of their MIDI track numbers, and even if some of them span multiple tracks.
I’m using LO 4.04 under Win XP Pro SP3.
Cheers
TonyR