There are no LabTalk functions to return Notes window names. You can (currently) only Create, Activate/Restore, Minimize, Maximize or Close Notes Windows. Using the exist function, you could test if a particular Notes Window exists. This means your only option at the moment is to use a strict convention and management scheme vis-a-vis Notes Windows. To do this, you must understand the automatic naming convention Origin uses:
window -new Notes BaseName;
If "BaseName" does not exist, then it is created.
If "BaseName" exists, then Origin will enumerate a number (#) from 1 until BaseName# does not exist and create it.
So until we have a function that returns Notes Window names, you can find the next available name with:
ii=0;
%A=BaseName;
if(exist(%A)==9) {
for(ii=1,done=0;done==0; ) {
if(exist(%A$(ii))==9) ii+=1; else done=1;
}
}
ii=;
If ii is zero, then the named window does not exist (an enumerated name might exist).
If ii is non-zero, then that number can be used to enumerate a new window.