Hello Tweedy,
Here are the steps to reproduce:
-Create and save a script file containing:
Call AddUserCommandToEvent("onPanelChanged", "yourSub")
Sub yourSub(LastPanel, NewPanel)
End Sub
The Call AddUserCommandToEvent adds the myTest function as a callback when the onPanelChanged event occurs. The function needs to contain the two parameters for the LastPanel and NewPanel. You can call your sub within that sub or just make your sub the callback function however it would have to have only the LastPanel and NewPanel as parameter inputs.
-Navigate to Settings>>Options>>Extensions>>User Commands
-Add the script you created above
-Click Refresh and the script should be loaded
Ian M.
National Instruments