Skip to content

hymkor/nyole

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Nihongo Yet another OLE for lua

Sample

Create OLE Object

local ole=require('nyole')
local objShell = ole.create_object("WScript.Shell")
print(objShell.SpecialFolders("Desktop"):Item(0))
  • create_object is the function for ANSI-String on the current codepage.
  • For utf8, use create_object_utf8

Iterator

local ole=require('nyole')
local fsObj=ole.create_object('Scripting.FileSystemObject')
local folder=fsObj:GetFolder('.')
local files=folder:files()

for val in files:__iter__() do
    print(val.name)
end
print("done")

Required Software to build

To build:

git clone https://github.com/zetamatta/nyole.git nyole
cd nyole
unzip PATH\TO\lua-5.3_Win??_dllw4_lib.zip
make