Musescore crash with cmd("copy")

• Jan 31, 2024 - 15:12

When i run this code my Musescore crashes.

Does anyone know the issue why I cannot copy selected range ?

import QtQuick 2.0
import MuseScore 3.0

MuseScore {
menuPath: "Plugins.pluginName"
description: "Description goes here"
version: "1.0"
onRun: {
var cursor = curScore.newCursor()
cursor.rewind(2)

    var endTick = cursor.tick
    console.log("endTick", endTick)
    cursor.rewind(1)

   curScore.selection.selectRange(1920,3840,0,0)
     cmd("copy")







        }
  }

Comments

Do you still have an unanswered question? Please log in first to post your question.