launching app from within base

The topic says it: is there a way to launch and application from with LO
base?

Other than LibreOffice app (Writer, Calc etc.)? I don't think so.

But why on earth would you need that?

The topic says it: is there a way to launch and application from with LO
base?

Could you be a bit more specific please. What type of application, why, to
do with what? Presumably something to do with Base, but without a bit more
context it's very hard to know where you're wanting to go with this.

Regards
Mark Stanton
One small step for mankind...

Mark Stanton wrote

What type of application, why, to do with what?

Simply to pass a path to an application (a filename, for instance) and
launch that application.

For instance, If one had a database of images, at various locations, a
click of the mouse (say on an icon provided in the search result form next
to the image name) could launch photoshop with the path/filename of the
image file and photoshop would load the image ready for editing. LO base
provides the search mechanism, photoshop provides the editing features.

I don't know why someone wouldn't want this feature. I've used this in
filemaker and it has been a great time saver.

Hi,

For instance, If one had a database of images, at various locations, a
click of the mouse (say on an icon provided in the search result form next
to the image name) could launch photoshop with the path/filename of the
image file and photoshop would load the image ready for editing. LO base
provides the search mechanism, photoshop provides the editing features.

I don't know why someone wouldn't want this feature. I've used this in
filemaker and it has been a great time saver.

Ah, you mean clickable links in Base that might actually do something
useful :wink:

Well, you won't find anything out of the box, you would have to code it
using a script, e.g. LO Basic. use cURL to take the name of the file
then pass it to the "shell" command - I had read somewhere a while ago
though that this didn't actually work anymore. Anyway you're going to
have to experiment with Basic or some other supported scripting language
if you want to do that.

Alex

Sorry, I don't know anything about Base - but in Writer you just insert a
"Hyperlink", chose "Document" and enter a Document URL. If the document has a
extension/MIMEtype/whatever which is known to the system, the default app will
open the document. That's at least how it works here.

Nino

Thanks! I don't see a URL setting in the Table Design. "Other" doesn't
seem to be the correct type.

Thanks! I don't see a URL setting in the Table Design. "Other" doesn't seem
to be the correct type.

Hi,

I think this does not belong to me

Regards
PMKA

Hi,

I think this does not belong to me

Regards
PMKA

Nino wrote

Sorry, I don't know anything about Base - but in Writer you just insert a
"Hyperlink", chose "Document" and enter a Document URL. If the document
has a
extension/MIMEtype/whatever which is known to the system, the default app
will
open the document. That's at least how it works here.

As I said, I don't see a "type" for URL other than text. But, it looks like
I could implement a macro or I also see there is some sort of python link in
OL. I don't know much about how to write OL macros, but on briefly looking,
it looks like it is too hard.

Anyone know if python integration is supported well?

Thanks for your help. I appreciate it.

brainflakes wrote

Thanks! I don't see a URL setting in the Table Design. "Other" doesn't
seem to be the correct type.

All forms are ordinary Writer documents and starting some other program has
nothing to do with Base.

Hyperlink...

There you can point to some macro, file, web-page, mail-address, whatever
can be reached by some URL.
file:///home/brainflakes/Documents/MyPic.png will launch some picture viewer
with the specified .png file.
You can insert
vnd.sun.star.script:MyLibrary.MyModule.StartFooApp?location=application&language=Basic
together with a label "Start Foo App". The hyperlink will call the specified
Basic macro in the global macro container.
The Basic macro may use the shell functions to launch a specific
application.
This works exactly the same way in Writer, Calc, Impress and Draw.

Nino wrote

As I said, I don't see a "type" for URL other than text. But, it looks
like I could implement a macro or I also see there is some sort of python
link in OL. I don't know much about how to write OL macros, but on briefly
looking, it looks like it is too hard.

Anyone know if python integration is supported well?

Thanks for your help. I appreciate it.

Well, you could launch your program like anybody else would launch a
program.

Hi Alex

Right - that is the answer and it is very very simple.

//drew

Nino wrote
>
>
> Sorry, I don't know anything about Base - but in Writer you just insert a
> "Hyperlink", chose "Document" and enter a Document URL. If the document
> has a
> extension/MIMEtype/whatever which is known to the system, the default app
> will
> open the document. That's at least how it works here.
>

As I said, I don't see a "type" for URL other than text. But, it looks like
I could implement a macro or I also see there is some sort of python link in
OL. I don't know much about how to write OL macros, but on briefly looking,
it looks like it is too hard.

Anyone know if python integration is supported well?

Thanks for your help. I appreciate it.

Hello rainflakes,

Sure, python is supported as a scripting language in LibreOffice.

I put together an example file from some questions on the list regarding
storing relative paths for images along with some a basic script,
embedded in an odb file just the other day.

https://wiki.documentfoundation.org/File:Linkme.odb

So - I went back into that and added a button on the form there, lower
right of the image control.

And added two procedures to the basic library embedded in the odb file,
one which is called for button execute (click or keyboard shortcut [if I
had set one]) and this calls a doEdit procedure.

Also added a new table called config, which has a field "GraphicEditor",
in which I store the value currently of "gimp" this works for me under
linux and windows but perhaps others under windows would want to edit
that to "mspaint" or whatever is appropriate.

Anyway - I choose in that script to store URLs so the script, you will
if you look, uses the convertFromURL to grab the file name passed. If
you wanted to add options to the command you would that also in the
config.GraphicEditor field - or at least that is how I would do it.

HTH,

//drew

Hi :slight_smile:
Hopefully one of the guides here might help
http://wiki.documentfoundation.org/Documentation/Publications#Programmers
Good luck and regards from
Tom :slight_smile:

Hi :slight_smile:
Hopefully one of the guides here might help
http://wiki.documentfoundation.org/Documentation/Publications#Programmers
Good luck and regards from

Hi Tom

Actually a google search for "libreoffice shell command" brings up:
http://help.libreoffice.org/Basic/Shell_Function_Runtime

Which is pretty good starting point.

//drew

Wow! Thanks all for the help! I'll look into each suggestion.

I was just thinking about this functionality! Thank you so much for
continously updating the Linkme.odb file!