DocumentTools/Canvas/Script/Command - Maple Help

DocumentTools[Canvas][Script]

 Command
 append a raw script command

 Calling Sequence Command(script,command)

Parameters

 script - DocumentTools:-Canvas:-Script object command - string or list of strings; raw script commands

Description

 • The Command interface allows you to record raw script commands intended for use in playback within the Maple Learn environment, and are invisible to operation within Maple.
 • Some raw script commands are as follows:

 MOVEREL MOVEREL:x:y x,y - signed integers Move currently active content by offset (x,y) MOVEREL:-100:+200 MOVE MOVE:x:y x,y - positive integers Move currently to absolute position (x,y) MOVE:10:250

Examples

 > $\mathrm{with}\left(\mathrm{DocumentTools}:-\mathrm{Canvas}\right):$
 > $\mathrm{sc}≔\mathrm{Script}\left('\mathrm{mode}'='\mathrm{Learn}'\right):$
 > $\mathrm{SetActive}\left(\mathrm{sc},"0:0"\right)$
 > $\mathrm{Command}\left(\mathrm{sc},"MOVE:300:200"\right)$
 > $\mathrm{cv}≔\mathrm{NewCanvas}\left(\left["Title"\right],\mathrm{sc}\right):$
 > $\mathrm{ShareCanvas}\left(\mathrm{cv}\right)$

Compatibility

 • The DocumentTools[Canvas][Script][Command] command was introduced in Maple 2021.