In message <[EMAIL PROTECTED]> you wrote: > In a dim and distant universe <[EMAIL PROTECTED]>, > Richard Porter <[EMAIL PROTECTED]> enlightened us thusly: >> Just one minor point though - when you click on a link that throws up a >> save dialogue, the button bar is attached to the dialogue box. I don't >> think this was intended. > > Also, another minor point is that when you click on a button and NetSurf > /doesn't/ have the caret, odd things happen to other applications. I > suspect this is because the button bar is simply passing certain keypresses > onto the wimp (for any other application to act on). It might be better to > detect whether or not NetSurf has the caret or not (not sure how difficult > this is though, but should be possible by reading NetSurf's task handle and > then reading the active window and comparing window handles.
I wrote (and use every day) an app that does what is required. Its called KlikMacro and what it does is to inject key presses (and/or mouse clicks) to the app with focus. It automatically switches the active macro menu for the app that has focus (which of course includes NetSurf). That way, the KlikMacro menu should always be correct when NS has focus. I do other tricks with apps that have multiple windows (e.g. NS) so that it can work out which window has the caret and do some kind of function based on the window title. Many other tricks can be done. KlikMacro is almost entirely written in Basic and has my entire Basic library (quite extensive) available to it so if you have any idea how the wimp works you can quickly program it to do exactly what you want (either in the macro for each button on the menus, or more complex things can be achieved by writing a new function in the Basic library and calling it from a button macro. KM also does much more than I've described here and it has routines for doing the sort of thing Paul describes. If anyone wants to try KlikMacro please email me and I'll send you a copy. [I must get around to putting it on a web site - one day] Mike