====== Scripts ======

Scripts are simple text files containing [[LUA]] code that, once executed by [[PlayOn]], can retrieve information from media websites, which it then passes to PlayOn to serve to your [[Media Players|Media Player]]. They are different than [[Plugins]] in that they are not compiled and do not require any special software or downloads other than a text editor, which all major operating systems have preinstalled.


A basic example of a LUA script, generated by playonscripts.com's [[http://playonscripts.com/labs/scriptmaker/|Script Maker v0.1]]:

--[[Settings
name = "New Script";
id = "New_Script";
description = "New Script made with PlayOnScripts.com Script Maker";
version = "1.0";
link = "http://www.playonscripts.com/";
apiversion = "1";
EndSettings]]--
--[[Update
return nil;
EndUpdate]]--
--[[Login
return false;
EndLogin]]--
--[[Director
function director:GetPlayerViewingRectangle(playerSize)
return Rectangle(0, 0, playerSize.Width, playerSize.Height - 30);
end;
EndDirector]]--


function New_Script_Resolve(url)
_SPECIAL_resolve_xml = ''..str_html_encode(url)..'3030';
end
--code root_0
function New_Script_New_Folder1()
--code New_Folder1
_vr("How to install Scripts", "code:New_Script_Resolve('http://www.youtube.com/watch?v=SFiEZjGDA6M')", "", "", ConvertTime("00:00:00"))

end

_vf("New Folder1", "New_Script_New_Folder1");


----

See Also: [[Helper Scripts]], [[Development Tools]]