views:

382

answers:

3

Anyone know of any examples that shows COM programming via Lua? Could require a library.

I need to write some external scripts for Photoshop, so wondering if it's possible with Lua.

+4  A: 

Have a look at Lua for Windows. It contains LuaCOM. I haven't tried it myself, though.

gimpf
+3  A: 

As gimpf said, take a look at LuaCOM. You can either get it from its official site, which is the latest version (1.4). Unzip it somewhere and take a look at the folder "Demo", which includes examples for:

  • ADO
  • Powerpoint
  • SAPI (Speech API)
  • WMI

They are more like test cases than examples but you can get the idea.

Ignacio
+1  A: 

You can roll your own system using CInvoke and some custom C/C++ code combined with Lua meta-tables.

http://www.nongnu.org/cinvoke/

From experience though I can't recommend this, it is pretty complicated and requires a lot of effort to get it right and make it bulletproof.

Ashley Davis