Syntax Highlighter

This optional syntax highlighter gives autocomplete for commands, params, and methods - it also highlights string templates containing interpolated variables and methods.

 


 

Chrome Syntax Highlighter

In Chrome > Window > Extensions:
- Click Find extensions and themes
- Search for Streamscript then click Add to Chrome
    Link: Google Chrome - Syntax Highlighter Extension

Firefox Syntax Highlighter

In Firefox > Tools > Add-ons:
- Search for Streamscript then click Add to Firefox
- Now find the Extensions puzzle icon and click Manage Extension
- Go to Permissions > Enable for sites in the force.com domain
- Go to Permissions > Enable for sites in the salesforce.com domain
    Link: Mozilla Firefox - Syntax Highlighter Add-on

 


 

Transcript:

Intro and editor colours

For work in Streamscript, we use this optional syntax highlighter. This gives the editor its colors and other benefits.

Let's try a new script.

 

Commands - how to autocomplete

First: commands. Any command I type, like HTTP POST, it will explain what the command does. I can hit enter for a shortcut on how to use it.

 

 

Parameters - hyphen to autocomplete

Second: parameters starting with a hyphen. It shows me the available parameter names like the URL, the headers, the body, or this flag for binary data.

 

 

Methods - dot to autocomplete

Third: methods starting with a dot. The syntax highlighter shows me how to call methods, in this case the URL trim.

 

Templates - how to interpolate

It also works in templates, like this example to get an 18 character ID.

 

 

Streamscript: Add to Chrome

So let's install this syntax highlighter. It's a chrome extension. Go to Window > Extensions > Find extensions and themes.

Search for Streamscript, click Add to Chrome and we're done. Back to the editor.

 

Here's another example of a command followed by a method, and the return keyword with another method. Click save, click debug, and we can see the HTTP POST, the keys for the response, the headers, and the body and so on.

 

 

Script runs independently

So in summary, we went to Extensions, searched for Streamscript and installed the optional syntax highlighter. This is cosmetic only and has no impact on the running of scripts.

 

 

 

Getting started with Streamscript
Install from the Salesforce AppExchange
Package install link: /packaging/installPackage.apexp?p0=04tGA000005R8Ny