Gadget File Requirements: Difference between revisions

From SDK
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
* -- Header Info and Disclaimer - Is not required but can provide helpful info about the gadget
* -- Header Info and Disclaimer - Is not required but can provide helpful info about the gadget
=====For Example:=====
=====For Example:=====
-- VECTRIC LUA SCRIPT
  1. -- VECTRIC LUA SCRIPT
-- ===================================================]]
  2. -- ===================================================]]
-- Gadgets are an entirely optional add-in to Vectric's core software products.  
  3. -- 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.
  4. -- 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.
  5. -- In no event will the author(s) or Vectric Ltd. be held liable for any damages arising from their use.
  6.
-- Permission is granted to anyone to use this software for any purpose,  
  7. -- Permission is granted to anyone to use this software for any purpose,  
-- including commercial applications, and to alter it and redistribute it freely,  
  8. -- including commercial applications, and to alter it and redistribute it freely,  
-- subject to the following restrictions:
  9. -- 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.  
  10. -- 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.
  11. -- 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.
  12. -- 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.
  13. -- 4. This notice may not be removed or altered from any source distribution.
   
  14.
  -- Easy Seed Gadget Master is written by Jim Anderson of Houston Texas 2020
  15. -- Easy Seed Gadget Master is written by Jim Anderson of Houston Texas 2020
  -- ===================================================]]
  16. -- ===================================================]]
  -- Global Variables --
  17. -- Global Variables --
  -- require("mobdebug").start()
  18. -- require("mobdebug").start()
  local Ver = "6.0"  -- Version 6: Jan 2020 - Clean Up and added Ver to Dialog   
  19. local Ver = "6.0"  -- Version 6: Jan 2020 - Clean Up and added Ver to Dialog   
  -- ===================================================]]
  20. -- ===================================================]]
  function DisplayTest(words)
  21. function DisplayTest(words)
  <nowiki> </nowiki> -- test a sub fuction
  22. -- test a sub fuction
  <nowiki> </nowiki>   DisplayMessageBox(words)
  23.   DisplayMessageBox(words)
return true
24.  return true
  end -- function end
  25. end -- function end
   
  26.
  -- ===================================================]]
  27. -- ===================================================]]
  function main(script_path)
  28. function main(script_path)
  --<nowiki>[[
  29. --[[
Gadget Notes: Dec 2019 - My New Gadget
30.  Gadget Notes: Dec 2019 - My New Gadget
 
31.  ]]
  ]]</nowiki>
  32. -- Localized Variables --
  -- Localized Variables --
  33.
   
  34. -- Job Validation --
  -- Job Validation --
  35.  local job = VectricJob()
  <nowiki> </nowiki> local job = VectricJob()
  36.  if not job.Exists then
  <nowiki> </nowiki> if not job.Exists then
  37.    DisplayMessageBox("Error: No job loaded")
  <nowiki> </nowiki>  DisplayMessageBox("Error: No job loaded")
  38.    return false ;  
  <nowiki> </nowiki>  return false ;  
  40.  end
  <nowiki> </nowiki> end
  41.
   
  42. -- Get Data --
  -- Get Data --
  43.
   
  44. -- Calculation --
  -- Calculation --
  45.
   
  46. -- Do Something --
  -- Do Something --
  47. DisplayTest("Great: The Gadget Seed is working" .. " Version: " .. Ver )
  <nowiki> </nowiki>
  48. return true
<nowiki> </nowiki> DisplayTest("Great: The Gadget Seed is working" .. " Version: " .. Ver )
  49. end  -- function end
  <nowiki> </nowiki>
  50. -- ===================================================]]
<nowiki> </nowiki> return true
   
end  -- function end
  -- ===================================================]]

Revision as of 08:29, 21 May 2023

Back.jpg

Gadget File Layout


  • -- VECTRIC LUA SCRIPT - Is required on the first line of the mail gadget file
  • -- Header Info and Disclaimer - Is not required but can provide helpful info about the gadget
For Example:
 1. -- VECTRIC LUA SCRIPT
 2. -- ===================================================]]
 3. -- Gadgets are an entirely optional add-in to Vectric's core software products. 
 4. -- They are provided 'as-is', without any express or implied warranty, and you make use of them entirely at your own risk.
 5. -- In no event will the author(s) or Vectric Ltd. be held liable for any damages arising from their use.
 6. 
 7. -- Permission is granted to anyone to use this software for any purpose, 
 8. -- including commercial applications, and to alter it and redistribute it freely, 
 9. -- subject to the following restrictions:
10. -- 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 
11. -- 2. If you use this software in a product, an acknowledgement in the product documentation would be appreciated but is not required.
12. -- 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13. -- 4. This notice may not be removed or altered from any source distribution.
14. 
15. -- Easy Seed Gadget Master is written by Jim Anderson of Houston Texas 2020
16. -- ===================================================]]
17. -- Global Variables --
18. -- require("mobdebug").start()
19. local Ver = "6.0"  -- Version 6: Jan 2020 - Clean Up and added Ver to Dialog  
20. -- ===================================================]]
21. function DisplayTest(words)
22. -- test a sub fuction
23.   DisplayMessageBox(words)
24.   return true
25. end -- function end
26. 
27. -- ===================================================]]
28. function main(script_path)
29. --[[
30.  Gadget Notes: Dec 2019 - My New Gadget
31.   ]]
32. -- Localized Variables --
33. 
34. -- Job Validation --
35.  local job = VectricJob()
36.  if not job.Exists then
37.    DisplayMessageBox("Error: No job loaded")
38.    return false ; 
40.  end
41.
42. -- Get Data --
43.
44. -- Calculation --
45.
46. -- Do Something --
47. DisplayTest("Great: The Gadget Seed is working" .. " Version: " .. Ver )
48. return true
49. end  -- function end
50. -- ===================================================]]