我发现一些代码在记事本中可以工作,但在资源管理器和其他一些软件中不能工作,如何将其更改为通用?或者有没有其他方法,无需通过滚轮事件即可滚动行数?
lines := 43
loop, %lines%
{
SendMessage, 0x115, 1, 0, %control%, A
}
ScrollLines(43)(43)
returnreturn
ScrollLines(lines,hWnd="") {ScrollLines(lines,hWnd="") {
static EM_LINESCROLL := 0xB6static EM_LINESCROLL := 0xB6
if !hWndif !hWnd
{{
ControlGetFocus, c, AControlGetFocus, c, A
ControlGet, hWnd, hWnd, , %c%, AControlGet, hWnd, hWnd, , %c%, A
}}
PostMessage, EM_LINESCROLL, 0, lines-1, , ahk_id %hWnd% ; 'lines-1' makes the line you wish to jump to visiblePostMessage, EM_LINESCROLL, 0, lines-1, , ahk_id %hWnd% ; 'lines-1' makes the line you wish to jump to visible
returnreturn
}}