๐ Interpreter Language Manual
๐ง What is Interpreter Language?
Interpreter Language (Developed by heck) is a simple language for creating widgets like counters, buttons, inputs, and draggable windows โ all without needing to write JavaScript directly.
Everything is written using easy-to-read commands inside special blocks starting with ^^
and ending with ^^;
.
This manual will guide you step-by-step, perfect if you're new to this!
๐งฑ Step-by-Step: Basic Structure
create div with id(#hello)^^
Don't put content inline with the command.
^^;
on its own line.
create div with id(#hello)^^ <p>Welcome!</p> ^^;
๐ฆ Creating Elements
To add elements, use create
with the element type and ID.
create div with id(#mybox)^^ <h1>Hello World</h1> <p>This is a custom widget.</p> ^^;
You can put any valid HTML inside the block.
๐พ Using Storage
Interpreter Language lets you save values that stick around even if the page reloads, using localstorage
.
set localstorage.score = "100";
default localstorage.count = 0;
inc localstorage.count; // increase by 1 dec localstorage.count; // decrease by 1 reset localstorage.count; // reset to empty
๐ฏ Event Listeners (Click Actions)
To react to clicks or other events, use create eventlistener-on(#id)-doing^^ ... ^^;
.
create eventlistener-on(#plus)-doing^^ inc localstorage.count; ^^;
This adds a click listener to #plus
that increases the count
stored value.
๐ง Getting Input Values
If you create an input element, you can get its current value using getvalue(#inputid)
.
#myinput
when a button is clicked:create eventlistener-on(#savebtn)-doing^^ set localstorage.text = getvalue(#myinput) ^^;
๐ Date Format
To show dates, use:
loadtextfrom(date.format="dd/mm/yyyy dayname")
Where:
dd
= day number (01โ31)mm
= month number (01โ12)mtext
= full month name (June)mtxt
= short month name (Jun)yyyy
= full year (2025)yy
= short year (25)dayname
= full weekday name (Friday)day
= short weekday name (Fri)
๐ Search Widget
Create a search box that links to a website search like Google with:
create searcher for-(https://google.com/search?q=!!gettextfrominputid!!)-inputid(#input)-buttonid(#btn)
This creates a search that sends input text to Google when the button is clicked.
๐จ Applying CSS
To add CSS styles, use set override css = ^^ ... ^^;
.
set override css = ^^ body { background: black; color: white; } ^^;
Note: Avoid overriding body styles if the parent page already has them.
๐ฆ Making Elements Draggable
To make an element draggable, add dragmovable
attribute to the element's div:
<div dragmovable>Drag me!</div>
You can also add offsets or save position:
<div dragmovable="-5,-5">Offset drag</div> <div dragmovable="0,0,stored">Saved position</div>
๐งช Full Example
set override css = ^^ body { #app: black; color: white; } ^^; default localstorage.count = 0; create div with id(#app)^^ <h1>Counter</h1> <p>loadtextfrom(localstorage.count)</p> <button id="plus">+<button> <button id="minus">-<button> ^^; create eventlistener-on(#plus)-doing^^ inc localstorage.count; ^^; create eventlistener-on(#minus)-doing^^ dec localstorage.count; ^^;
This creates a simple counter widget with increment and decrement buttons.
๐ Rules You Must Follow
- Start code blocks with
//pluginname{Plugin Name}version{1.0}Author{Author}
(recommended). - Commands must start with the command and
^^
on the same line, no line break. - Content must be written between the two
^^
lines and closed with^^;
. - Never write content inline like
create div ^^ <p>Hi</p> ^^;
. Use new lines. - Each command block (
create
,set
,eventlistener
,css
) must follow this format. - Widgets should have a style property
z-index: 1;
on div IDs for visibility. - Widgets are best made draggable using
dragmovable
attribute.
๐ก Tips
- Don't override
body
styles unless necessary. - Use professional and cool dark-themed CSS for better user experience.
- Make widgets draggable with a header bar for easier movement and saving position.