Gadget File Requirements: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 8: | Line 8: | ||
=====For Example:===== | =====For Example:===== | ||
-- VECTRIC LUA SCRIPT | |||
-- ===================================================]] | -- ===================================================]] | ||
-- Gadgets are an entirely optional add-in to Vectric's core software products. | -- Gadgets are an entirely optional add-in to Vectric's core software products. | ||
-- They are provided 'as-is', without any express or implied warranty, and you make use of them entirely at your own risk. | -- They are provided 'as-is', without any express or implied warranty, and you make use of them entirely at your own risk. | ||
-- In no event will the author(s) or Vectric Ltd. be held liable for any damages arising from their use. | -- In no event will the author(s) or Vectric Ltd. be held liable for any damages arising from their use. | ||
-- Permission is granted to anyone to use this software for any purpose, | -- Permission is granted to anyone to use this software for any purpose, | ||
-- including commercial applications, and to alter it and redistribute it freely, | -- including commercial applications, and to alter it and redistribute it freely, | ||
-- subject to the following restrictions: | -- subject to the following restrictions: | ||
-- 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. | -- 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. | ||
-- 2. If you use this software in a product, an acknowledgement in the product documentation would be appreciated but is not required. | -- 2. If you use this software in a product, an acknowledgement in the product documentation would be appreciated but is not required. | ||
-- 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | -- 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | ||
-- 4. This notice may not be removed or altered from any source distribution. | -- 4. This notice may not be removed or altered from any source distribution. | ||
-- Easy Seed Gadget Master is written by Jim Anderson of Houston Texas 2020 | -- Easy Seed Gadget Master is written by Jim Anderson of Houston Texas 2020 | ||
-- ===================================================]] | -- ===================================================]] | ||
-- Global Variables -- | -- Global Variables -- | ||
-- require("mobdebug").start() | -- require("mobdebug").start() | ||
local Ver = "6.0" -- Version 6: Jan 2020 - Clean Up and added Ver to Dialog | local Ver = "6.0" -- Version 6: Jan 2020 - Clean Up and added Ver to Dialog | ||
-- ===================================================]] | -- ===================================================]] | ||
function DisplayTest(words) | function DisplayTest(words) | ||
<nowiki> </nowiki> -- test a sub fuction | |||
<nowiki> </nowiki> DisplayMessageBox(words) | |||
return true | |||
end -- function end | end -- function end | ||
-- ===================================================]] | -- ===================================================]] | ||
function main(script_path) | function main(script_path) | ||
--[[ | --<nowiki>[[ | ||
Gadget Notes: Dec 2019 - My New Gadget | |||
]]</nowiki> | |||
-- Localized Variables -- | -- Localized Variables -- | ||
-- Job Validation -- | -- Job Validation -- | ||
<nowiki> </nowiki> local job = VectricJob() | |||
<nowiki> </nowiki> if not job.Exists then | |||
<nowiki> </nowiki> DisplayMessageBox("Error: No job loaded") | |||
<nowiki> </nowiki> return false ; | |||
<nowiki> </nowiki> end | |||
-- Get Data -- | -- Get Data -- | ||
-- Calculation -- | -- Calculation -- | ||
-- Do Something -- | -- Do Something -- | ||
<nowiki> </nowiki> | |||
<nowiki> </nowiki> DisplayTest("Great: The Gadget Seed is working" .. " Version: " .. Ver ) | |||
<nowiki> </nowiki> | |||
<nowiki> </nowiki> return true | |||
end -- function end | end -- function end | ||
-- ===================================================]] | -- ===================================================]] | ||
Revision as of 09:18, 21 May 2023
Gadget File Layout
'-- VECTRIC LUA SCRIPT'
is required on the first line of the mail gadget file
For Example:
-- VECTRIC LUA SCRIPT
-- ===================================================]]
-- Gadgets are an entirely optional add-in to Vectric's core software products.
-- They are provided 'as-is', without any express or implied warranty, and you make use of them entirely at your own risk.
-- In no event will the author(s) or Vectric Ltd. be held liable for any damages arising from their use.
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it freely,
-- subject to the following restrictions:
-- 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
-- 2. If you use this software in a product, an acknowledgement in the product documentation would be appreciated but is not required.
-- 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-- 4. This notice may not be removed or altered from any source distribution.
-- Easy Seed Gadget Master is written by Jim Anderson of Houston Texas 2020
-- ===================================================]]
-- Global Variables --
-- require("mobdebug").start()
local Ver = "6.0" -- Version 6: Jan 2020 - Clean Up and added Ver to Dialog
-- ===================================================]]
function DisplayTest(words)
-- test a sub fuction
DisplayMessageBox(words)
return true
end -- function end
-- ===================================================]]
function main(script_path)
--[[
Gadget Notes: Dec 2019 - My New Gadget
]]
-- Localized Variables --
-- Job Validation --
local job = VectricJob()
if not job.Exists then
DisplayMessageBox("Error: No job loaded")
return false ;
end
-- Get Data --
-- Calculation --
-- Do Something --
DisplayTest("Great: The Gadget Seed is working" .. " Version: " .. Ver )
return true
end -- function end
-- ===================================================]]