Home
Download
Screenshots

Wiki
Plugins
Translations
Developers
Donate

Forums/Help
Contact Us

StrokeIt

Ho do I call plugins from Lua?

Posted by gemisigo 
Ho do I call plugins from Lua?
February 03, 2010 04:34AM
How do I call the "On Screen Display" plugin from Lua? The code below does not seem to work. Why? I guess because OSD is not categorized as util (it is Utilities) the first parameter of plugin.call is incorrect. Perhaps the second one too. How should I make it work?

  local text = "yeah"
  local time_ms = 500; local size = 64;
  local font = "@Arial Unicode MS";
  local r = 255; local g = 0; local b = 0;
  local h = "Center"; local v = "Center";
  local params = string.format([["%s" "%d" "%d" "%s" "%d" "%d" "%d" "%s" "%s]], text, time_ms, size, font, r, g, b, h, v );
  plugin.call("", "On Screen Display", params);
Leo
Re: Ho do I call plugins from Lua?
February 03, 2010 05:18AM
local text = "yeah"
local time_ms = 500 
local size = 64
local font = "@Arial Unicode MS"
local r = 0
local g = 255
local b = 0
local h = 2 --left=0;center=1;right=2
local v = 1  --top=0;center =1;buttom=2

local params = string.format([["%s" "%d" "%d" "%s" "%d" "%d" "%d" "%d" "%d]], text, time_ms, size, font, r, g, b, h, v )
plugin.call("osd", "OSD", params)


--osd, OSD  "On Screen Display" "1275" "96" "28 Days Later" "0" "255" "0" "0" "0"

--osd, OSD  "On Screen Display" "1275" "96" "28 Days Later" "0" "255" "0" "2" "1"
--  ^    ^- real call name in "name"
--real name in "name"

Look in cfg file



Edited 2 time(s). Last edit at 02/03/2010 05:22AM by Leo.
Re: Ho do I call plugins from Lua?
February 03, 2010 05:47AM
That was a very constructive proposal, thank you, Leo. I should have thought about that :)
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 10 plus 13?
Message: