* How to Run Application in LUA IUP Frame
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
How to Run Application in LUA IUP Frame
Does anyone know how to execute a Windows application program within a LUA IUP GUI Window Frame?
Currently I use the FH API fhShellExecute(strExecutable) but this runs the executable program in a separate Windows window.
I've looked at LUA os.execute(strExecutable) but that does not seem to help.
I want to run a Windows executable program so that what normally appears in its own Windows GUI appears in a LUA IUP Window Frame instead.
ID:5543
Currently I use the FH API fhShellExecute(strExecutable) but this runs the executable program in a separate Windows window.
I've looked at LUA os.execute(strExecutable) but that does not seem to help.
I want to run a Windows executable program so that what normally appears in its own Windows GUI appears in a LUA IUP Window Frame instead.
ID:5543
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to Run Application in LUA IUP Frame
I have never seen a way to do that in any language I have used which ones have you seen which can do that?
I suppose you might have seen OLE embedding, but that's a low levels windows interface.
What are you trying to achieve?
I suppose you might have seen OLE embedding, but that's a low levels windows interface.
What are you trying to achieve?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- NickWalker
- Megastar
- Posts: 2401
- Joined: 02 Jan 2004 17:39
- Family Historian: V7
- Location: Lancashire, UK
- Contact:
How to Run Application in LUA IUP Frame
That was my thought too, I've never come across a way to do this in Windows.
I seem to remember years ago it used to be possible in Windows to run an application as an MDI child of another window (and this may still be possible), but that doesn't appear to be what Mike is asking about.
I seem to remember years ago it used to be possible in Windows to run an application as an MDI child of another window (and this may still be possible), but that doesn't appear to be what Mike is asking about.
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
How to Run Application in LUA IUP Frame
I have nearly finished combining Jane's Map Life Events and Map Geo Code Maintenance with several added features:
1) Mapping either Place or Address fields.
2) Filtering on Private &/or Living flags.
3) Sticky option settings, including multi-PC users.
4) Support for standalone GEDCOM projects.
5) If the output folder is FH Family Tree CD/Website then integrate the Webpage Maps with the featured Web Pages.
The plugin now runs the Google Maps Geocoder to map locations into latitude/longitude by using HTML Application (HTA) and crude XML file communication.
It would be nice to embed the Google Maps Geocoder HTA window within the main LUA IUP GUI window.
The IUP talks about OLE and Web Browser embedding controls, but no great detail and no worked examples.
1) Mapping either Place or Address fields.
2) Filtering on Private &/or Living flags.
3) Sticky option settings, including multi-PC users.
4) Support for standalone GEDCOM projects.
5) If the output folder is FH Family Tree CD/Website then integrate the Webpage Maps with the featured Web Pages.
The plugin now runs the Google Maps Geocoder to map locations into latitude/longitude by using HTML Application (HTA) and crude XML file communication.
It would be nice to embed the Google Maps Geocoder HTA window within the main LUA IUP GUI window.
The IUP talks about OLE and Web Browser embedding controls, but no great detail and no worked examples.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- NickWalker
- Megastar
- Posts: 2401
- Joined: 02 Jan 2004 17:39
- Family Historian: V7
- Location: Lancashire, UK
- Contact:
How to Run Application in LUA IUP Frame
Ah OK, web applications or OLE may well be possible, you mentioned Windows applications which are not quite the same. Sorry but can't help with that as I've not used Lua. Sounds like you're making some excellent progress though, well done.
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to Run Application in LUA IUP Frame
HTA are just web pages in disguise, so if you can make it an HTML page you can embed a web page into LUA fairly easily.
using something like:
using something like:
Code: Select all
-- iupole-browser.lua
--
-- Duplicate the iupole_browser.cpp sample in pure lua
require 'iuplua'
require 'iupluaole'
require 'luacom'
-- create the WebBrowser based on its ProgID
local control = iup.olecontrol{'Shell.Explorer.2'}
-- connect it to LuaCOM
control:CreateLuaCOM()
-- Sets production mode
control.designmode= 'NO'
-- Create a dialog containing the OLE control
local dlg = iup.dialog{
title='Display HTML in IUP Dialogue',
size='HALFxHALF',
iup.vbox{
control,
}
}
-- Show the dialog and run the main loop
dlg:show()
control.com:Navigate('D:\temp\testmap.html')
if (not iup.MainLoopLevel or iup.MainLoopLevel()==0) then
iup.MainLoop()
end
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
How to Run Application in LUA IUP Frame
Thanks Jane, that looks promising, and I believe I tried something like that, but it comes up with following error:
Line 7: module 'luacom' not found:
no field package.preload['luacom']
no file 'C:ProgramDataCalico PieFamily Historian 5.0 BetaPluginsluacom.fh_lua'
no file 'C:Program Files (x86)Family Historian 5.0 BetaProgramluacom51.dll'
no file 'C:Program Files (x86)Family Historian 5.0 BetaProgramluacom.dll'
no file 'C:ProgramDataCalico PieFamily Historian 5.0 BetaPluginsluacom.dll'
No changes have been made to data records.
Line 7: module 'luacom' not found:
no field package.preload['luacom']
no file 'C:ProgramDataCalico PieFamily Historian 5.0 BetaPluginsluacom.fh_lua'
no file 'C:Program Files (x86)Family Historian 5.0 BetaProgramluacom51.dll'
no file 'C:Program Files (x86)Family Historian 5.0 BetaProgramluacom.dll'
no file 'C:ProgramDataCalico PieFamily Historian 5.0 BetaPluginsluacom.dll'
No changes have been made to data records.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to Run Application in LUA IUP Frame
Ah sorry, it worked on my PC, but I might have copied over the extra dll's from the Lua for Windows install.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
How to Run Application in LUA IUP Frame
I tried simply copying the luacom.dll download from SourceForge to the C:Program Files (x86)Family Historian 5.0 BetaProgram folder, but still got an error like Procedure missing.
Is there any way I could install luacom to see if iup.olecontrol will run my HTA script within an IUP Dialogue?
Alternatively, after your Course tomorrow, perhaps I could send you my HTA script to see if it will run within an IUP Dialogue.
If that is successful, then we need to persuade Simon to include it in the FH LUA.
Is there any way I could install luacom to see if iup.olecontrol will run my HTA script within an IUP Dialogue?
Alternatively, after your Course tomorrow, perhaps I could send you my HTA script to see if it will run within an IUP Dialogue.
If that is successful, then we need to persuade Simon to include it in the FH LUA.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- NickWalker
- Megastar
- Posts: 2401
- Joined: 02 Jan 2004 17:39
- Family Historian: V7
- Location: Lancashire, UK
- Contact:
How to Run Application in LUA IUP Frame
Have you tried registering the dll?
regsvr32 path-to-dll
regsvr32 path-to-dll
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to Run Application in LUA IUP Frame
I have asked Simon to include the dll in the next beta.
I have just rebuilt my Laptop ready for the course, so once the course is over, I will double check which dlls are needed.
I have just rebuilt my Laptop ready for the course, so once the course is over, I will double check which dlls are needed.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."