Carlos Villar Posted September 8, 2019 Share Posted September 8, 2019 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 More sharing options...
Carlos Villar Posted September 9, 2019 Author Share Posted September 9, 2019 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 More sharing options...
Xenobiologist Posted September 10, 2019 Share Posted September 10, 2019 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 More sharing options...
Exit Posted September 10, 2019 Share Posted September 10, 2019 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 More sharing options...
Exit Posted September 12, 2019 Share Posted September 12, 2019 To all: Please give feedback, whether browser, mail and media are called or not. Please specify Windows version and Autoit version. Thanks. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Exit Posted September 12, 2019 Share Posted September 12, 2019 (edited) A simple replacement for Send("{Browser_Home}") is ShellExecute("HTTP:") but that works only with google chrome browser Edited September 15, 2019 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Exit Posted September 14, 2019 Share Posted September 14, 2019 Send("{BROWSER_HOME}") Now I've tried it on Windows 7 and behold, it works. Is it a bug in Windows 10 or in Autoit? But ShellExecute("HTTP:") doesn't work in Windows 7 Any comments? App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now