Why Scripts are Needed
Considering the complexities of reality, PLM supports users in writing their own scripts for analyzing and extracting web pages, processing imports, scraping, and other operations, in order to achieve secondary development purposes.
Currently in the initial stage, the author does not have much energy to write detailed documentation. You can refer to the included .htm/.pas/.js/.py files. Using the "Script Assistant" in your browser can also help you obtain some script assistance information. You are welcome to email the author for communication.
Supported Scripting Languages
- Pascal: Since the author currently develops using Pascal, this language is the best supported.
- Python: Currently in the experimental stage.
- JavaScript: Usable, needs to be run in the browser (scraping scripts are not supported).
Accessing PLM Data and Function Calls in Scripts
Please refer to the .htm/.pas/.js/.py files under the PLM directory for details.
- plmget()/plm.get()
Get a certain attribute value of various categories: plmget('table', '', 'columns=fid,fname,code,fullpath;from=0;count=1;format=text', sResult)
- plmset()/plm.set()
Set a certain attribute value of various categories: plmset('', 'KeyURL', sURL)
- plmcall()/plm.call()
Call the specified function of various categories: plmcall('showmsg', 'Hello world', sTmp)
Calling PLM in Web Pages
- plm://run/xxx
Run a certain function: For example, Settings
- plm://cache/#
Embed a cache file of #
- plm://web/xxx.js
Go to a web page in the PLM directory
- plm://get/xxx
Same as plmget() but returns asynchronously
- plm://set/xxx
Same as plmset() but returns asynchronously
- plm://call/xxx
Same as plmcall() but returns asynchronously