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")
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.
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"?
sorry.. I can call only the "deployed" app?
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.