External Code and External Library Kwik 3 (Expert)

With this short tutorial, you learn how to use your own lua library to insert to Kwik.

mylibrary.lua
———————–

local _M = {}
_M.print = function(layer)
  for k,v in pairs(layer) do
    print (k)
  end
end
return _M

———————–

external code is in mydebug.lua that uses mylibrary. It is just one line code.

———————–

myLib.print(layer)

———————–

you can find mylibrary.lua and mydebug.lua in the following zip.

https://www.kwiksher.com/tutorials/Multi/Recording_Sample.zip

Project and Pages > Add External Library
Add_New_Library_and_Add_External_Library_and_page2_psd___100___Cnt__RGB_8_
Add_External_Library
i
t is inserted as myLib

Project and Pages > Add External Code
Add_External_Code
m
ydebug.lua is just to print myLib.print(layer) passing layer to the parameter

layer is a table which collects each display object generated from photoshop layer
iPad_mini_-_768x1024_and_All_Messages_and_main_lua

Now you know how to  extend Kwik generated lua files with your own codes .