[HN Gopher] LuaRT: Lua programming environment for console, desk...
___________________________________________________________________
LuaRT: Lua programming environment for console, desktop
applications for Windows
Author : thunderbong
Score : 163 points
Date : 2024-05-24 05:49 UTC (1 days ago)
(HTM) web link (luart.org)
(TXT) w3m dump (luart.org)
| bionsystem wrote:
| Not a programmer, but I see it can use COM objects :
|
| https://luart.org/doc/sys/COM-constructor.html
|
| does that mean we can use it to manipulate Office files just as
| in VB or PowerShell ?
| jodrellblank wrote:
| A COM client will let you control Office desktop applications,
| and use those to open and edit Office files. You need them
| installed first.
|
| (Contrast with Doug Finke's Import-Excel module for PowerShell
| which can work with Excel files without Excel installed, and
| Przemyslaw Klys's PSWriteWord module that can write Word files
| without Word. They can't do as much as full Excel and Word
| can).
| bionsystem wrote:
| Thanks this is very clear. I use COM objects through
| PowerShell too, not the Import-Excel module, because I cannot
| install anything (except Office) on my client's work machine.
| But I can copy binaries so working with Lua might relieve my
| headaches from working with PowerShell :)
| jodrellblank wrote:
| From the PowerShell Github releases page[1] you can expand
| 'assets' and 'show more assets' and find a ZIP distribution
| which doesn't need installing, unzip it. e.g.
| PowerShell-7.4.2-win-x64.zip . Then from PowerShell 7
| somewhere, run Save-Module ImportExcel
| -Path C:\Whatever\
|
| and copy that module folder along with the PowerShell
| folder to the remote machine, and you can import modules
| from a full path: Import-Module
| C:\Whatever\ImportExcel
|
| and do a no-install copy-paste deployment of powershell 7
| and modules. (I'm not saying you _should_ do this instead
| of using Lua, just that you can).
|
| [1] https://github.com/PowerShell/PowerShell/releases
| bionsystem wrote:
| Nice, thanks. But I have other limitations as well
| (Powershell 5 only and scripts must be signed, which I
| believe includes external modules).
|
| Don't ask me why I can run a random binary instead, I
| don't know and I don't want to know.
| _samt_ wrote:
| I'm the main author of LuaRT. Yes LuaRT can automate Office
| apps through COM
| bionsystem wrote:
| Great job, thanks for your work !
| _samt_ wrote:
| Thank you :)
| walterbell wrote:
| Can COM automation work between two networked Windows
| desktops?
|
| Edit: I guess that would be DCOM, https://en.wikipedia.org/wi
| ki/Distributed_Component_Object_M...
| theultdev wrote:
| Very cool! This reminds me of the program I used as a kid to make
| GUI apps.
|
| https://www.indigorose.com/autoplay-media-studio/screenshots...
| (surprisingly it works for W11)
|
| Lua was my first language, and it enabled me to make desktop apps
| for tools I needed.
|
| I think this is very much needed as a lot of kids learn Lua from
| Roblox and game mod communities.
| yannis wrote:
| ZeroBrain studio is also good.
| theultdev wrote:
| ZeroBrain was nice but it's just an IDE.
|
| AutoPlay Studio and the one featured here makes full GUI
| apps.
| squarefoot wrote:
| TekUI integration with a builder might be an interesting
| feature. It's a bit dated but the latest release compiles
| just fine and examples work. Years ago I tried it also on a
| small Allwinner ARM board with output to the framebuffer
| (no Xorg) and it worked fine. I wonder why it is still
| semi-unknown.
|
| http://tekui.neoscientists.org/
| riidom wrote:
| Tiny nitpick: It's ZeroBrane
| paulclinger wrote:
| It's an IDE, but it allows building full GUI apps. It's
| itself written in Lua using wxlua/wxwidgets toolkit, so has
| access to the majority of the modules availables in
| wxwidgets. The binaries are also bundled with the IDE for
| all supported platforms, so you can develop and package
| your own application in the same way.
| Ciantic wrote:
| I'm always looking for alternatives to AutoHotkey and small C
| WINAPI programs I've written. Rust doesn't quite cut it, even
| with Microsoft's windows-rs library using the WinAPI functions is
| worse than it was with plain C. This is because you have to hunt
| the right libraries and features to import, it's surprisingly
| time-consuming.
|
| Excited to look how LuaRT exposes WinAPI, my ideal would be one
| global namespace where you can easily auto-import all the normal
| functions. Microsoft has made it somewhat easy for library
| authors to generate the externs with their relatively new
| Win32metadata package: https://github.com/microsoft/win32metadata
| _samt_ wrote:
| LuaRT encapsulates the Windows API around a think object
| oriented layer for Lua. All objects, properties and functions
| are organized with Lua modules
| aragonite wrote:
| > I'm always looking for alternatives to AutoHotkey and small C
| WINAPI programs I've written. Rust doesn't quite cut it ...
|
| You can access the win32 api in Node via Koffi. Here's a
| MessageBox example: https://koffi.dev/start#for-windows
|
| Also see node-activex (https://github.com/durs/node-activex)
|
| AHK2's syntax is also very close to Javascript these days. It's
| quite pleasant to use and the C++ source is very well-
| documented.
| pjmlp wrote:
| I know not everyone loves the syntax, but that would be
| relatively easy with Powershell, or than plain .NET.
| 7thaccount wrote:
| It's not just the syntax. Powershell is just ridiculously
| slow for doing things like iterating through text files.
|
| Don't get me wrong... powershell is really nice for some
| kinds of IT work, but I've had lots of trouble with it. I
| love the succinct nature, but it takes a lot of effort to get
| a line of code to do what you need it to do...even after
| you've spent a LOT of time with the language.
| bitwize wrote:
| PS C:\> Find-SuccinctNature PowerShell -ComparedTo Bash
| Find-SuccinctNature: Object not found
| bitwize wrote:
| Lazarus? Tcl/Tk (no, really, it's great)? PyWin32?
| bambax wrote:
| > _Windows versions older than 8.1 are no more supported_
|
| Does this mean it's simply no longer tested on Win7, or that it
| absolutely won't work?
| _samt_ wrote:
| LuaRT will work on older versions. Latest UI feature (themes,
| HighDPI) won't work. But any feedback on older versions is
| welcome
| mobilio wrote:
| Anything about XP?
|
| PS: I'm not kidding! Some customers (government) are still on
| XP...
| walterbell wrote:
| _> still on XP_
|
| Hopefully not connected to untrusted networks..
| mobilio wrote:
| actually they are working in separated networks w/o
| access to internet
| rcarmo wrote:
| I wish I had a similarly well maintained analogue for macOS.
| _samt_ wrote:
| LuaRT is open source, maybe someone will make a MacOS port
| guerby wrote:
| Out of curiosity did you test it under Linux with Wine? :)
| _samt_ wrote:
| Yes I have tested it several months ago, and it worked.
| Don't know now if it's still the case
| szundi wrote:
| What is this Lua excitement all around?
| alberth wrote:
| It strikes this unique balance between simplicity, productivity
| and raw performance.
|
| It's certainly not the right language for all use cases. But
| embedded or extending, it particularly does well.
| steelbird wrote:
| Think Python but smaller and simpler, less batteries included
| 7thaccount wrote:
| One major missing element on the GUI page is some kind of table
| widget that can display tabular data. A lot of GUI needs involve
| needing to display data, but many widget toolkits just have
| things like buttons, radio buttons, message boxes, and
| tree/hierarchy things.
|
| Besides that...I really like this project.
| _samt_ wrote:
| Thank you :) A Grid widget is planned
| 7thaccount wrote:
| Yessss! Thank you!
___________________________________________________________________
(page generated 2024-05-25 23:00 UTC)