PDA

View Full Version : Running external programs and apps



barrymavin
2014-01-13, 23:59
Lianja.showDocument() has some interesting functionality that is not well known. You can invoke the desktop browser, run external applications, run other apps (in a new runtime container) and also run Lianja/VFP scripts (in a new runtime container).

Lianja.showDocument() handles desktop associations. e.g..

Lianja.showDocument("http://www.google.com")

Lianja.showDocument("myspreadsheet.xlsx")

Lianja.showDocument("myspecialapp.exe")

Lianja.showDocument("lianja --app myapp --username myusername --password mypassword")

Lianja.showDocument("lianja myform.prg")

phabio
2014-01-14, 02:19
Barry, you are fantastic!

if you launch a new app, I can also specify which page to open and send the inline commands?

if you can ... we did bingo!

barrymavin
2014-01-14, 02:33
I would have to look in the code and see. There may be a --args command line argument that could call showDocument() to select a page and search or other actions.

phabio
2014-01-14, 03:05
Fantastic!

phabio
2014-01-15, 06:57
Question:
with Lianja.showDocument("lianja --app myapp --username myusername --password mypassword") I can open only the "builded" application?

barrymavin
2014-01-15, 07:27
I don't understand the question. What do you mean by "builded application"?

phabio
2014-01-15, 08:03
sorry.. I can call only the "deployed" app?

tekhong
2014-01-29, 14:54
Hi Barry

I type the following in my console window for VFP but no error and nothing happens

lianja.showdocument("f:\staff\sherlie\book2.xlsx")
lianja.showdocument("c:\hrm\peoplehr.exe")

Please advise

Thanks & Best Regards

davefoss
2014-01-29, 15:27
Hi Barry

I type the following in my console window for VFP but no error and nothing happens

lianja.showdocument("f:\staff\sherlie\book2.xlsx")
lianja.showdocument("c:\hrm\peoplehr.exe")

Please advise

Thanks & Best Regards


When including the full path to a file please include "file:///". For example:

showdocument("file:///f:\staff\sherlie\book2.xlsx")

I hope this helps.