Hi MLL,
> Oh, and also, a cool feature is that it automatically
> pastes the clipboard into its textbox when called through
> the keyboard shortcut (Ctrl+Alt+G). Surely I'd love to
> see this function in DQSD too.
I looked at the code in DQSD to try to make this possible - it's just
not easy. :)
DQSD doesn't send a message of any sort (that I can see) to the window
telling it that it was raised by the shortcut key. This makes a
difference since you might have clicked it and not intended to have
the text changed (I extend and play with code there a LOT so know
exactly how this could be a problem).
I've made a pseudo-solution by adding the following script to
localprefs.js:
'// ========================================================
function clickhandler(){
if (document.deff.q.value == ""){
document.deff.q.value="gg "+window.clipboardData.getData("Text");
def();
}
}
document.onclick = clickhandler;
'// ========================================================
This pastes the content and searches on it directly in google - but
only if there is no text in the search box. It also takes effect every
time the window is clicked - which, IMO, sucks.
Would this be something people would like to have as an option? Or
would you rather add another shortcut (perhaps WIN+SHIFT+S) to
"default search" using clipboard? This could be done by sending a
special message to the dqsd window when the keyboard shortcut is
pressed. As it is it seems to be simulating a click, which is why the
code above works.
The problem with doing it directly in the DQSD window is that it can't
handle the WIN key, so detecting if it was pressed is impossible (as
far as I can tell). You really have to pass the information from the
dll as a global keyhook. :(
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
'// ========================================================
I haven't fought just one person for so long...I've been
specializing in groups, fighting gangs for local
charities...that kind of thing.
-- 'Fezzik', The Princess Bride
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel