Interactive Ink

switching input text to script on myscript.

Hello myscript,

I used 

this.myscriptPad.mathCalculator.editorElement.editor.pointerEvents(stroke, false) to import strokes from a canvas but then I tried to manually convert them using 

this.myscriptPad.mathCalculator.editorElement.editor.convert() to actual script but that doesn't seem to work. What could I possibly be  missing? I tried to wait for idle too like so :




physically tapping on the screen does convert it.



using javascript for this.

Dear Daniel,

Your use case is related to "Raw Content", see :

When you call the "editor.pointerEvents" method the stroke is immediately processed.

What you can do is to store your imported stroke into a variable and then call the "editor.pointerEvents(stroke)" method manually.

Let me know if this is usefull.



Hello mael,

You misunderstood my question. The adding strokes to myscript works. Its changing them to actual text that doesnt. Here is my code in more detail:

I have a timeline when a stroke is inputed on to myscript and on that timeline I also have an event when I want to change it actual text using convert. 

So this function works:


  const processGestures = true;

  this.myscriptPad.mathCalculator.editorElement.editor.pointerEvents(strokes, processGestures);


it successfully adds the user input to myscript.

but then my other function to convert that user input doesnt work:




I used waitingforIdle function too but that didnt help either. Changing  var ProcessGestures  to any value  doesn't help either.  But I'm more confused why convert() didnt work.

Here is one of my inputted strokes:



Thanks again for you help,


hello Mael,

I forgot to add that I call pointerEvents once for each stroke that the user makes, so I call that function multiple times. 



Hello again,

I figured it out, I need to shoot  custom pointer events because all my listeners are based on pointers and not mouse.


Dear Daniel,

Thank you for the update, we are glad you solved your issue! 

Best regards, 


Login or Signup to post a comment