@Command([WindowWorkspace]);@Command([WorkspaceStackReplicaIcons])
This simple code should stack/unstack replica icons. However it always ends in “Cannot execute the specified command”.
I believe the problem is not caused by the “WorkspaceStackReplicaIcons” statement; it’s a problem with “WindowWorkspace”. Specifically, a problem calling the workspace to the foreground when it is already opened. My best guess is the order of execution is disregarded and “WindowWorkspace” is treated like a PostedCommand. The end result is that the “StackReplica” executes first before Workspace which results in an error; as expected. I am able to confirm this assumption by pairing WindowWorkspace with other Commands. The end result is that Command I define executes on the document containing my test button and not the workspace.
However, if I close the workspace tab before clicking the button it works. Also, if I run NLNOTES it works regardless of the workspace being open.