Jump to content

Send("{BROWSER_HOME}") not working


Recommended Posts

I was writing what I thought would be a simple BROWSER_HOME hotkey, but it's not working; I cannot understand why and I haven't found any clues on the forum.

I have a remote control that appears to the computer as a keyboard. Indeed, it has a BROWSER_HOME key and when pressed the computer opens a browser window as expected. I'm now trying to remap this key to BACKSPACE if I'm currently using Kodi, and leave it as it is otherwise:

...

; Remaps the remote control
If ($home_tools = "true") Then
    HotKeySet("{F4}", "hotkeyF4")
    HotKeySet("{F5}", "hotkeyF5")
    ;   HotKeySet("{F6}", "hotkeyF6")
    HotKeySet("{F7}", "hotkeyF7")
    HotKeySet("{BROWSER_HOME}", "hotkeyBROWSER_HOME")
EndIf

...

Func hotkeyBROWSER_HOME()
    If WinActive("[CLASS:Kodi]") Then
        Send("{BACKSPACE}")
    Else
        HotKeySet("{BROWSER_HOME}")
        Send("{BROWSER_HOME}")
        ;MsgBox(48, "BROWSER_HOME", "BROWSER_HOME")
        ;Send("{F1}")
        HotKeySet("{BROWSER_HOME}", "hotkeyBROWSER_HOME")
    EndIf
EndFunc   ;==>hotkeyBROWSER_HOME

...

Other hotkeys work as expected. So does the hotkey BROWSER_HOME if I'm running Kodi. However, if I'm not running Kodi, either the key BROWSER_HOME is not being sent, or Windows is ignoring it. I know I get into that section of code thanks to the MsgBox that I've commented out. Equally, I know I can successfully send other keys, like the commented out F1. Any idea as to what is going on? Thank you.

Link to comment
Share on other sites

I have noticed that if I have a scrip that simply does:

Send("{BROWSER_HOME}")
MsgBox(48, "BROWSER_HOME", "BROWSER_HOME")

I get the MsgBox but the browser doesn't get opened. Which seems to suggest that the issue is not with HotKeySet, but rather than with my Windows 10 ignoring the Send("{BROWSER_HOME}"), whereas it acknowledges the same from the remote control.

Link to comment
Share on other sites

Do you just want to open the standard browser with its start page?

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Seems to be a common problem.
At least for me the special buttons do not work either.
Windows 10 version 1903

Send("#d")     ; clear desktop
Sleep(500)
Send("{Browser_Home}")
Send("{LAUNCH_MAIL}")
Send("{LAUNCH_MEDIA}")

No browser, no mail and no music. ☹️

App: Au3toCmd              UDF: _SingleScript()                             

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...