之前小众软件介绍过一个好用的,支持chrome窗口的系统界面元素信息文本获取工具。
这个非常小的软件潜力强大,结合ahk,我发现了很多玩法,现在分享一个我觉得可能对大家有用的功能——其他浏览器/app模式 打开当前浏览器书签、当前网页、网页内链接…。
|
|
话不多说,先看一下效果。
之前小众软件介绍过一个好用的,支持chrome窗口的系统界面元素信息文本获取工具。
这个非常小的软件潜力强大,结合ahk,我发现了很多玩法,现在分享一个我觉得可能对大家有用的功能——其他浏览器/app模式 打开当前浏览器书签、当前网页、网页内链接…。
|
|
话不多说,先看一下效果。
第零步,为以无障碍模式启动浏览器,通过为快捷方式后添加 --force-renderer-accessibility。
第一步,点击textify更多设置,设置鼠标快捷键为ctrl + f22,并设置为自动复制,这样一来,就可以通过快捷键将鼠标位置下方 浏览器书签 文本复制到剪贴板
[keyboard]
key=0x85
ctrl=1
alt=0
shift=0
......
auto_copy_selection=1
......
第二步,通过ahk处理剪贴板,提取出链接,通过其他浏览器或者app模式打开链接
ahk代码
#Persistent
#WinActivateForce
^f3::
;ctrl+f3,通过edge的app模式打开网页
send ^{f22}
sleep 500
send {esc}
RegExMatch(clipboard, "(?<=`r`n).*$", http)
if (SubStr(http, 1, 4) = "http" )
{
AppAddress = msedge.exe --app=%http%
Run, %AppAddress%
}else
{
AppAddress = msedge.exe --app=http://%http%
Run, %AppAddress%,UseErrorLevel
}
return
#Persistent
#WinActivateForce
^f2::
;ctrl+f2,通过鲸鱼浏览器打开网页
send ^{f22}
sleep 500
send {esc}
RegExMatch(clipboard, "(?<=`r`n).*$", http)
if (SubStr(http, 1, 4) = "http" )
{
AppAddress = C:\Program Files\Naver\Naver Whale\Application\whale.exe %http%
Run, %AppAddress%
}else
{
AppAddress = C:\Program Files\Naver\Naver Whale\Application\whale.exe http://%http%
Run, %AppAddress%,UseErrorLevel
}
return
不喜欢占用剪贴板的同学也可以通过这个软件内置的组件联动ahk,也可以不通过粘贴板实现数据传递,这层楼挖个坑,闲下来接着写。
首先,在textify设置中增加一个按钮,功能是通过ahk代码用opera浏览器打开
[web_button_2]
name=opera
icon=icons\opera.ico
command=C:\省略\ahk\operaopen.ahk %s
width=1200
height=600
第二,ahk代码
#SingleInstance force
GoSub, getParams
; construct tray menu -- DEBUG: optional
Return
/*
********** Subroutines **********
*/
; process command line parameters -- DEBUG: optional (see above)
getParams:
If 0 > 0
{
Loop, %0% ; for each parameter
{
param := %A_Index%
http:= StrReplace(param,"%0D%0A", "`r`n")
http:= StrReplace(http,"%3A", ":")
http:= StrReplace(http,"%2F", "/")
http:= StrReplace(http,"%3F", "?")
http:= StrReplace(http,"%3D", "=")
http:= StrReplace(http,"%26", "&")
http:= StrReplace(http,"%23", "#")
RegExMatch(http, "(?<=`r`n).*?$", http)
if (SubStr(http, 1, 4) = "http" )
{
AppAddress = C:\省略\Opera.exe %http%
Run, %AppAddress%
}else
{
AppAddress = C:\省略\Opera.exe http://%http%
Run, %AppAddress%,UseErrorLevel
}
StringLeft, paramType, param, 1
If paramType = - ; switch indicator
{
; determine type of switch
StringMid, switch, param, 2, 1
; switch
If switch = x ; DEBUG: template (replace "x")
{
; access value (= next parameter)
param = % A_Index + 1
var_x := %param% ; DEBUG: template (replace "var_x")
}
}
}
}
Return
第三步,设置鼠标快捷键
在书签栏书签ctrl + 右键,会出现自定义的opera按钮,按下去会用opera浏览器打开该书签
这个软件我以前也收集过. 现在电脑里还存着. 但是一般不用.
因为有时候会遇到无效的情况, 所以多数情况下, 都是直接用 mouseINC的 ocr了.
这个软件可以提取到看不见的部分,比如书签栏书签的链接,肉眼只能看见文字。此外还有一些窗体显示不全,以省略号隐藏掉的部分。