Skip to main content
Topic: Must a User Tool act only on a single staff? (Read 12331 times) previous topic - next topic

Must a User Tool act only on a single staff?

I'm a newbie to NWC User Tools. I'd like to know if I can write a User Tool to do things to more than one staff. For example, I have used VB and SendKeys to copy a set of bars in NWC Window-1, and append it to all the staves in Window-2.

Is the entire NWC object model (Windows, Stave collection, MIDI settings, etc.) exposed to the User Tools interface? Thanks in advance.

Joe D
:)
Love and peace,
Joe

Re: Must a User Tool act only on a single staff?

Reply #1
G'day Joe,
welcome to the forum.

Now:
<snip>I'd like to know if I can write a User Tool to do things to more than one staff.<snip>
If you can figure out a way there'll be a few people here who will be most pleased...

Quote
Is the entire NWC object model (Windows, Stave collection, MIDI settings, etc.) exposed to the User Tools interface?
As far as I know, only objects on the staff are exposed.  Thus the staff's properties are not available...

There is, of course, the .nwctxt format...  This is a text file that can be exported which has the entire work described within it.  No reason not to programattically edit this file and reimport.

Useful in some cases, but I'd still like a multi staff capability for user tools.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Must a User Tool act only on a single staff?

Reply #2
As far as I know, only objects on the staff are exposed.
It is worse than that. Only to objects in the selection are exposed.

And there must be a selection (except when a tool is invoked on an empty staff). This means that a User Tool cannot insert something at the current cursor location. It can only add things to the current selection.

Using SendKeys is something of a "dark art." Routines that work perfectly on Win98, fail miserably on WinXP.

NWC2 stores much valuable info in the Registry. Unfortunately, it doesn't read or write most of this info except at startup and shutdown.

I could go on and on, but I'll stop here... for now...
Registered user since 1996

 

Re: Must a User Tool act only on a single staff?

Reply #3
Dear Rick and Lawrie,

Thanks to you both for your easily understood replies. I have been reading many of both of your posts in other parts of the Forum and I agree with the consensus, you are both Virtuosi. :)

Using SendKeys is something of a "dark art." Routines that work perfectly on Win98, fail miserably on WinXP.

I totally agree. That is why I am investigating User Tools. I wrote a chord composer using SendKeys to NWC from the VB based UI. I asked one of my fellow choir members who has NWC to test it for me. It failed miserably on her XP machine. There are Windows Administration ways to get around this but it seems to be different for Vista, XP and who knows about Win 7. :..)

BTW, just after I posted my original question, I happened to click on the "Tool for layering??" subject, started by fathafluff. Your responses in there spoke my question as well. Have either of you guys considered starting a sticky subject that might be titled "Toward a NWC Scripting Programmer's Manual Wiki"? You could collect a bunch of your responses to newbies like me in there. If you wanted, you could encourage others to participate.

Anyway, thanks to both of you for your virtuosity.

Joe D.
:)
Love and peace,
Joe