Jump to content

HotkeySet browser forward/back problems


Recommended Posts

I bought this new mouse today that has two buttons {BROWSER_FORWARD} and {BROWSER_BACK} and they work great (in a browser).

Two problems -

1) I want to use those buttons in excel for moving back and forward when using the auditor.

Macroing the back and forward is not a problem but how do I recognize when the back or forward button has been pressed?

Where or how can I find codes for these keystrokes?

2) Send() and HotkeySet() key codes are supposed to be the same but while this works:

; this works
HotKeySet("{END}","Doit")

While 1
    Sleep(100)
WEnd

Func Doit()
        Send("{BROWSER_FORWARD}")
EndFunc

This does not work

;this does not work
HotKeySet("{BROWSER_FORWARD}","Doit")

While 1
    Sleep(100)
WEnd

Func Doit()
        msgBox(0,"","You did it")
EndFunc

I'm using XP and excel 2003

Please help. Thanks.

!!!!HOLD IT I THINK I FOUND SOMETHING - Will Test and advise

Nope I fiddled around with "!{RIGHT}" which does the same as "{BROWSER_FORWARD}" but is not the same and does not respond on that mouse button.

Edited by 1905russell
Link to comment
Share on other sites

Nothing after nearly 12 hours?

Okay I'll figure this out somehow but the main question still is if HotKeySet() and Send() codes per the helpfile are the same then

Why does Send("{BROWSER_FORWARD}") work but

HotKeySet("{BROWSER_FORWARD}","Doit") does not work?

Link to comment
Share on other sites

HotKeySet("{BROWSER_FORWARD}","Doit") does not work?

Maybe someone should add "{BROWSER_FORWARD}" to Hotkeys that cannot be set.

But instead

_IsPressed("06", "user32.dll") works

So thank you all for not responding because it caused me to answer my own question and hopefully help someone else.

Link to comment
Share on other sites

Maybe someone should add "{BROWSER_FORWARD}" to Hotkeys that cannot be set.

But instead

_IsPressed("06", "user32.dll") works

So thank you all for not responding because it caused me to answer my own question and hopefully help someone else.

Thanks for posting the resolution you discovered.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I think the problem here is that the mouse button itself is not equivalent to {BROWSER_FORWARD}. The software that comes with your mouse is probably doing the same thing your script is, it's just sending the {BROWSER_FORWARD} message when it detects that particular mouse button being pressed, and HotKeySet cannot bind keys to mouse buttons.

The 06 code for _IsPressed corresponds directly to a mouse button (Windows 2000/XP: X2 mouse button), and in this case I guess it matches the button on your mouse.

*Edit: And just for clarification, the whole reason I mentioned this is because when I used HotKeySet to remap those buttons on one of my keyboards, it worked fine.

Edited by Saunders
Link to comment
Share on other sites

Everything you say is probably the way it is. Thanks.

Okay lets forget about the mouse buttons. I did see that 06 was an auxiliary mouse button but lets just rejoice that it works. BTW its on special at a bigbox wholesale club in Ontario for $29 Cnd.

And just for clarification, the whole reason I mentioned this is because when I used HotKeySet to remap those buttons on one of my keyboards, it worked fine.

You used HotKeySet on those keyboard buttons thats great because could you please save me some time and advise what keys you used? I have tried to read that browser_forward key but nothing shows up on AU3Record nor ExcelMacroRecord. However on QuickMacros it does record as an equivalent to Send("!{RIGHT}") which produces the correct action. As you know, HotKeySet("!{RIGHT}","Doit") only response to Alt+RightArrow and does nothing when the BrowserForward key is pressed. A keycapture function I found in the forums also never registered anything. So what is the HotKeySet key that you used?

These browser forward/back keys on the keyboard are here to stay (and eventually I guess on the mouse). They are not generic keys and so someday soon

HotKeySet("{BROWSER_FORWARD}","Doit") will Do it. Or what do you think?

In the mean time there should be a reference in the helpfile under the non-settable keys section - No browser forward\back keys etc and maybe a reminder - No mouse keys.

Otherwise hopefully others will see this thread and save themselves the trouble of finding out the hard way.

So please, you are hopefully going to show us how to access those keys on the keyboard as you say using HotKeySet(). Thanks again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...