ExternalWidget in scriptlet is not allowed? (5.1.1)

An example of using an ExternalWidges in a scriptlet is shown in the manual

var ExW : ExternalWidget

    W   : String

 

//Called when a NoteOn message is received

On NoteOnEvent(m : NoteMessage) 

 W = GetUserVariable("MyVar")

 if BindWidget(ExW, W) then

  SetExternalWidgetValue(ExW, 1.0)

 end 

End

But an error occurs when compiling

Scriptlet (Script Entity: Scriptlet) - owned by rackspace: Rackspace_0 - Semantic error in “Main”: Line 21, Col 7: Type not found: ExternalWidget

What is wrong ?

Really in a scriptlet?
Can you show the example?

I followed the manual , there is an example but doesn’t work

You are right, is not working.

Where is this example? ExternalWidgets are only allowed in rackspace scripts

The manual says

Now you can use this example script to set widget values from this scriptlet:

Hmm, not sure what happened here - I have those mechanisms commented out for scriptlets but I don’t have a notation as to why but I suspect we decided that it was just not a good idea for scriptlets to know about widgets

Just to inform of a misunderstanding, because I wanted to know if it was possible to write a label in a widget from a scriptlet and I found this information

Additional information found as I wanted to check that functionality, too: the scripting manual also mentions this ability for scriptlets.