by johnw3600 » Thu Jul 29, 2010 6:33 am
Thanks Zvezdan,
I did post a reply to this but it got lost in the ether when the MediaMonkey site got lost for a while!
ax1.Interf.document.activeElement.ID replies with an empty string!I suspect that this is because an image object doesn't go 'Active' even though it does fire the OnClick event! So something else is needed.
I tried innumerable variations on window.event.srcElement.tagName with no joy either.
For the moment I have 4 OnClick handlers (like ClickHandler_1 etc) each on which calls ClickHandler(n) immediately, so the code block only has to appear once. This works, but is not a really neat solution.
Since Script.RegisterEvent logs the event handler against the caller element in the panel, it must be possible to read which element threw the event, but I don't see how! Or is this a limitation on VBScript? (its obviously not a MM issue)
Or, can you set up a value in Script.RegisterEvent to be parsed (not passed) as a parameter when the event fires? I already know you can't register a handler as: ClickHandler("this_one") !!!
Other than this issue of code compactness (which is what the above is really all about), I now have my Big Buttons working fine, with four of them taking you to MagicNode folders in the Tree, and four more sending the selected album tracks to each of said folders, by updating the Custom1 field in the SongList (called Source in this instance).
This works very well with a Touch Screen, when perpetually typing into the required field is tedious!
In short, you can categorize an album according to its 'Source' as follow...
One click on the 'Unknown' Source button to open that node in the Tree,
One click on the album art for an album in the TrackWindow display, and
One click on the 'SendtoStudio' button to catagorize this album as 'Studio' in the Custom1 (Source) field!
I would happily publish this in the Wiki, but I would rather sort the Handler issue (above) out first, as currently I have 8 handlers when 2 would do!
Regards,
John
Thanks Zvezdan,
I [i]did [/i]post a reply to this but it got lost in the ether when the MediaMonkey site got lost for a while!
[b]ax1.Interf.document.activeElement.ID[/b] replies with an empty string!I suspect that this is because an image object doesn't go 'Active' even though it does fire the OnClick event! So something else is needed.
I tried [i]innumerable [/i]variations on [b]window.event.srcElement.tagName[/b] with no joy either.
For the moment I have 4 OnClick handlers (like ClickHandler_1 etc) each on which calls ClickHandler(n) immediately, so the code block only has to appear once. This works, but is not a really neat solution.
[b]
Since Script.RegisterEvent logs the event handler against the caller element in the panel, it must be possible to read which element threw the event, but I don't see how![/b] Or is this a limitation on VBScript? (its obviously [u]not [/u]a MM issue)
[b]Or, can you set up a value in Script.RegisterEvent to be parsed (not passed) as a parameter when the event fires?[/b] I already know you can't register a handler as: ClickHandler("this_one") !!!
Other than this issue of code compactness (which is what the above is really all about), I now have my Big Buttons working fine, with four of them taking you to [i]MagicNode [/i]folders in the Tree, and four more sending the selected album tracks to each of said folders, by updating the Custom1 field in the SongList (called Source in this instance).
This works very well with a Touch Screen, when perpetually typing into the required field is tedious!
In short, you can categorize an album according to its 'Source' as follow...
One click on the '[b]Unknown[/b]' Source button to open that node in the Tree,
One click on the [b]album art[/b] for an album in the TrackWindow display, and
One click on the '[b]SendtoStudio[/b]' button to catagorize this album as 'Studio' in the Custom1 (Source) field!
I would happily publish this in the Wiki, but I would rather sort the Handler issue (above) out first, as currently I have 8 handlers when 2 would do!
Regards,
John