Clo*_*kex 1 windows google-chrome bookmarks
在工作中,我依赖基于 Flash 的管理工具。传统上,该工具托管在 Web 服务器上,但自从 Flash 消亡后,拥有该工具的公司将其与 Adobe Air 打包在一起,以便可以在本地安装。我习惯通过打开书签来打开该工具,但现在我必须从开始菜单中打开它。
如果我能有一个书签来启动该工具的本地 Air 打包副本,那就太方便了。这可能吗?我尝试创建一个这样的书签:
file://C:/path/to/tool.exe
Run Code Online (Sandbox Code Playgroud)
...但它尝试下载它。
有没有办法让 Chrome 书签执行 Windows 程序?
您可以使用AutoHotKey来执行此操作:
appurl.reg文件中并运行它。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\appurl]
@="URL:AutoHotKey AppURL Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\appurl\DefaultIcon]
@="appurl.exe,1"
[HKEY_CLASSES_ROOT\appurl\shell]
[HKEY_CLASSES_ROOT\appurl\shell\open]
[HKEY_CLASSES_ROOT\appurl\shell\open\command]
@="\"C:\\Program Files\\AutoHotKeyAppURL\\appurl.exe\" \"%1\""
Run Code Online (Sandbox Code Playgroud)
; Application URL v1.0 by Jeff Sherk
;
; Will run a program that you pass in as a parameter (command line argument).
; Specifically created to be used with URL Protocol appurl://
;
; EXAMPLE:
; You can type appurl://path/to/myapp.exe in the address bar of your browser to launch the application
;
; See these threads:
; http://www.autohotkey.com/forum/viewtopic.php?p=477917
; http://www.autohotkey.com/forum/viewtopic.php?t=76997
; http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx
; http://stackoverflow.com/questions/2330545/is-it-possible-to-open-custom-url-scheme-with-google-chrome
;
; Requires adding the following Registry Entry to work. You can copy and paste whats between the dashed lines
; into a file called: appurl.reg Just remember to remove all the semi-colons; at the beginning of the lines.
;-------------------------------------------------------------------
;Windows Registry Editor Version 5.00
;[HKEY_CLASSES_ROOT\appurl]
;@="URL:AutoHotKey AppURL Protocol"
;"URL Protocol"=""
;[HKEY_CLASSES_ROOT\appurl\DefaultIcon]
;@="appurl.exe,1"
;[HKEY_CLASSES_ROOT\appurl\shell]
;[HKEY_CLASSES_ROOT\appurl\shell\open]
;[HKEY_CLASSES_ROOT\appurl\shell\open\command]
;@="\"C:\\Program Files\\AutoHotKeyAppURL\\appurl.exe\" \"%1\""
;-------------------------------------------------------------------
if 0 != 1 ;Check %0% to see how many parameters were passed in
{
msgbox ERROR: There are %0% parameters. There should be 1 parameter exactly.
}
else
{
param = %1% ;Fetch the contents of the command line argument
appurl := "appurl://" ; This should be the URL Protocol that you registered in the Windows Registry
IfInString, param, %appurl%
{
arglen := StrLen(param) ;Length of entire argument
applen := StrLen(appurl) ;Length of appurl
len := arglen - applen ;Length of argument less appurl
StringRight, param, param, len ; Remove appurl portion from the beginning of parameter
}
Run, %param%
}
Run Code Online (Sandbox Code Playgroud)
appurl.ahk为。appurl.exe.exe将移至C:\Program Files\AutoHotKeyAppURL。现在您可以通过在地址栏中键入以下内容来启动任何程序appurl://path/to/myapp
例子:
appurl://C:/WINDOWS/system32/notepad.exe
Run Code Online (Sandbox Code Playgroud)
编辑:要支持包含空格的路径,请file:///在文件路径之前添加:
appurl://file:///C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Run Code Online (Sandbox Code Playgroud)
您也可以将其另存为书签。
| 归档时间: |
|
| 查看次数: |
1457 次 |
| 最近记录: |