Didacticials

  • To begin
  • Make Automations [comming soon]
  • Make Didacticials or Presentations [comming soon]

Instructions

  • goTo
  • click
  • wait
  • message
  • for
  • alert
  • ifexists / ifnotexists
  • whileExists
  • audio
  • exit

Links

  • Download Zenith
  • jQuery's Selectors

About Zenith

  • Credits and Thanks
  • Binairies Sources

To Begin

A very simple ZeL Script

To begin, we will create our first ZeL script, the one that you have (n)ever dreamt : the one which do nothing:

{
  "do":[]
}
Those who know how JSON works should be able to recognize it.
We can see that this script begins with "{" (left brace) and ends with "}" (right brace) : that is crucial.
"do" is followed with a serial instructions that are between "[" (left bracket) and "]" (right bracket) (in that example, there is no instruction)

Now, we add instructions :

{
  "do":[
{"goTo":"#header"},
{"wait":3000},
{"message":"This message will last 5 seconds",
  "duration":5000}
]}

The instructions are blocs that begin with "{" (left brace) and ends with "}" (right brace), and are seperated by comma. Serial instructions are surrounded by "[" (left bracket) and "]" (right bracket). An instruction can have several pairs (for instance, "message" instruction have "message" and "duration" elements)

To learn more about those instructions, refer to the instructions listed on the menu to the left.

Now, let us see optional base-pairs. Base-pairs are pairs that are at the first level of the ZeL script (the same level than the first "do"). The optional base-pairs are :

  • "debug":boolean (if set at true, alert when an error occurs; default : false)
  • "url":"address" (open a new tab with the address indicated, on whose page will be executed the instructions)

Now, if we complete our script :

{
"debug":true,
"url":"http://doc.zenith.free.fr",
  "do":[
{"goTo":"#header"},
{"wait":3000},
{"message":"This message will last 5 seconds",
  "duration":5000}
] }

    

Insertion of a ZeL script

Now, we will see how to insert your ZeL scripts to your Web Pages.

First, insert a piece of Javascript code :

if you want to check that the user has the add-on Zenith, you can add a function that test the User-Agent

Then, we add an HTML element to click on, with the attribute "zel" which is the name of the function that returns the ZeL script, to execute the ZeL script :

And that's all :p, you can test it here :

Vocabulary

  • pair :
      "name":value
      Examples : {"goTo":"a:first"},
        {"wait":3000}

© 2009 the Zenith Team.