工作中经常需要参考其它的文件,脑袋左右摆动或者文件窗口频繁最大化最小化挺麻烦的,有没有什么方法能够截取屏幕特定的区域,动态变化显示在一个窗口里,这个窗口还可以固定显示在最上层以及移动调整位置?
有很多放大镜类软件可以做到,(放大倍数调成1就行了),还有用AutoHotkey也可以写一个
我待会找找看
我也有这个需求我用的是MouseInc 这个鼠标手势里的 画中画pip功能 截取一部分可以是实现变化只有200kb 很方便 也是我觉得唯一好用 和唯一使用的功能 只要截取的窗口不最小化 被程序挡住也可以试试更新
举个例子 比如我在做 翻译的时候我会参考多个翻译引擎的结果
最近还开始使用AI 但是 克劳德AI 屏占比太大了
我就会把克劳德放在第二个屏幕上 然后用 上边提到的 MouseInc 截取一部分能看到克劳德回复的区域把这一小绺实时截图的区域放到主屏
这样我就不需要来回摆动头部或者移眼睛来回移动去瞟另外一块屏幕了
直接在主屏上通过这一小块实时截图就能看到克劳德的翻译 很方便
1 Like
OBS Studio + 窗口预览,现成的解决方案
搞定了!
使用效果:
可以把任意显示器或跨显示器的特定区域,动态地显示在一个窗口,并显示在最上.
放大倍数从十六分之一到十六倍可调
和OnTopReplica不同,显示的是物理屏幕的特定区域,而不是某个窗口的特定区域.
使用快捷键 win+x 来使投影位置不跟随鼠标
其他快捷键为原始脚本自带快捷键,用不上
OnExit handle_exit
Gui, +AlwaysOnTop +Owner +Resize +ToolWindow ; window for the dock
Gui, Show, NoActivate w400 h400 x300 y50 , PrintScreen
Gui, Add, DDL, vzoom y0, 0.0625|0.125|0.25|0.5|1||2|4|8|16
Gui, Add, Checkbox, y0 x150 vantialize Checked, 去锯齿
Gui, Add, Slider, vdelay x210 y0 Range15-200
Gui, Add, Text, x340 y0 w80 vdelay2
WinGet PrintScreenID, id ,PrintScreen ;
WinSet, Transparent , 254, PrintScreen
;retrieve the unique ID number (HWND/handle) of that window
WinGet, PrintSourceID, id
hotkey , #+x , toggle_follow
hotkey , #x , toggle_fix
hotkey , +$LButton , click_through
toolbar_def:=20
toolbar := toolbar_def
follow :=0
fixxy:=0
hdd_frame := DllCall( "GetDC", UInt, PrintSourceID )
hdc_frame := DllCall( "GetDC", UInt, PrintScreenID )
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC", UInt, hdc_frame) ; buffer
hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap", UInt,hdc_frame, Int,A_ScreenWidth, Int,A_ScreenHeight)
Gosub, Repaint
return
toggle_follow:
follow := 1 - follow
if follow = 1
{
WinSet Region, 0-0 W%ww% H%wh% E , PrintScreen
toolbar := -32 ; height of window title
GuiControl, Hide, zoom
}
else
{
WinSet Region,, PrintScreen
toolbar :=toolbar_def
GuiControl, Show, zoom
}
Return
toggle_fix:
if fixxy
fixxy := 0
else
{
fixxy := 1
MouseGetPos, fix_x, fix_y
}
Return
click_through:
if follow = 1
{
Gui, Hide
Send, {Click}
SetTimer, Repaint , Off
Sleep, 100
Gui, Show
SetTimer, Repaint, %delay%
}
Return
Repaint:
CoordMode, Mouse, Screen
MouseGetPos, start_x, start_y ; position of mouse
Gui, Submit, NoHide ; needed to read the dropdown and slidervalue
GuiControl,, delay2 , delay %delay% ms
WinGetPos, wx, wy, ww, wh , PrintScreen
wh2 := wh - toolbar
if fixxy
{
DllCall( "gdi32.dll\SetStretchBltMode", "uint", hdc_frame, "int", 4 * antialize ) ; Halftone better quality with stretch
DllCall("gdi32.dll\StretchBlt", UInt,hdc_frame, Int,0, Int,toolbar, Int,ww, Int,wh - toolbar
, UInt,hdd_frame, Int
, fix_x-(ww / 2 / zoom)
, Int,fix_y -( wh2 / 2/zoom), Int,ww / zoom, Int,wh2 / zoom ,UInt,0xCC0020) ; SRCCOPY
if follow = 1
WinMove, PrintScreen, ,fix_x -ww/2 , fix_y-wh/2
SetTimer, Repaint , %delay%
}
else
{
DllCall( "gdi32.dll\SetStretchBltMode", "uint", hdc_frame, "int", 4 * antialize ) ; Halftone better quality with stretch
DllCall("gdi32.dll\StretchBlt", UInt,hdc_frame, Int,0, Int,toolbar, Int,ww, Int,wh - toolbar
, UInt,hdd_frame, Int
, start_x-(ww / 2 / zoom)
, Int,start_y -( wh2 / 2/zoom), Int,ww / zoom, Int,wh2 / zoom ,UInt,0xCC0020) ; SRCCOPY
if follow = 1
WinMove, PrintScreen, ,start_x -ww/2 , start_y-wh/2
SetTimer, Repaint , %delay%
}
Return
GuiClose:
handle_exit:
DllCall("gdi32.dll\DeleteObject", UInt,hbm_buffer)
DllCall("gdi32.dll\DeleteDC", UInt,hdc_frame )
DllCall("gdi32.dll\DeleteDC", UInt,hdd_frame )
DllCall("gdi32.dll\DeleteDC", UInt,hdc_buffer)
ExitApp
dog 大佬,您怎么每次碰到这种问题都能光速码完看着很长的ahk
这个有大佬分享的现成的,改一改就行,添加了个功能
似乎在小窗口中无法显示鼠标指针?
1 Like
这个特定区域是怎么设置范围的?
靠自行拖拽调节窗口大小和快捷键固定位置
需要自行摸索一下
当然,会ahk的可以自己加个范围选取功能快捷键
我还没来得及加,凑活用
就是不会我才找到 MouseInc 用这个嘛 哈哈
按理说 PiP 是最符合的解决方案。
不过直接让窗口显示在最前端不就行么? 很多软件都有让其他软件前端显示的功能。
比如 AHK,用 AHK 还可以让软件去掉边框。
;==================================================
;** 快捷键 Win+` 使当前窗口置顶
;==================================================
#`::
WinSet, AlwaysOnTop, toggle,A
WinGetTitle, getTitle, A
Winget, getTop,ExStyle,A
if (getTop & 0x8)
TrayTip 已置顶, 窗口标题: `n%getTitle%,10,1
else
TrayTip 取消置顶, 窗口标题:`n %getTitle%,10,1
return