AutoHotKey
화면확대후 키보드로 슬라이드 화면스크롤하기
쵸코난
2022. 10. 13. 20:34
어떤 윈도우 화면이든 마우스 우클릭과 드래그로 화면창을 스크롤할 수 있는 오토핫키 스크립트가 있습니다.
https://github.com/mmikeww/DragToScroll
위 파일을 실행하고 파워포인트나 웹브라우저에서 화면을 확대한 상태에서
마우스 우클릭하면 드래그하면 화면이 스크롤 됩니다.
시스템 트레이창에서 종료하거나 설정을 바꿀 수 있습니다.
특히 파워포인트 화면을 확대한 후 포토샵처럼 스페이스 누른 채로 마우스를 드래그해서 화면을 옮겨다닐 수 있으면 좋을겁니다. 예전에 추가기능이 있었던 것 같은데 찾을 수가 없네요.
간단히 오토핫키로 w,a,s,d키로 확대횐 슬라이드 편집화면을 스크롤할 수 있게 만들어 보았습니다.
어떤 도형이나 개체를 삽입했든 해당 단축키를 누르면 화면이 스크롤됩니다.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, Pixel, Screen
#SingleInstance
;; Scroll PowerPoint Slideview
MsgBox, 0x40, Scroller, Press <Win+a> to activate then press <w`,s`,a`,d> to scroll the PowerPoint slide view.`n`nPress <Win+s> to pause and <Win+x> to quit.
;Menu, Tray, Icon,, %A_ScriptFullPath%, 1
Menu, Tray, Icon, shell32.dll, 101
Menu, Tray, Tip, [Win+a] Activate [w`,s`,a`,d] Scroll [Win+s] Pause [Win+X]: Exit
Menu, Tray, NoStandard
Menu, Tray, Add, Exit, ExitMenu
Active := False
return
#a::
Active := True
Menu, Tray, Icon, shell32.dll, 100
return
$s::
if (Active)
Scroll(2,0,0,0) ;down
else
Send, s
return
$w::
if (Active)
Scroll(0,2,0,0) ;up
else
Send, w
return
$d::
if (Active)
Scroll(0,0,2,0) ;right
else
Send, d
return
$a::
if (Active)
Scroll(0,0,0,2) ;left
else
Send, a
return
Scroll(a, b, c, d) {
ppt:=ComObjActive("PowerPoint.Application")
ppt.Visible := True
IfWinActive, ahk_exe POWERPNT.EXE
{
ppt.Windows(1).Activate
ppt.Windows(1).Panes(2).Activate
try ppt.Windows(1).SmallScroll(a,b,c,d)
ppt:=""
}
}
#s::
Active := False
Menu, Tray, Icon, shell32.dll, 100
return
ExitMenu:
#x::
ExitApp
exe를 먼저 실행합니다.
슬라이드 확대화면에서
먼저 [Win+a]를 눌러 스크롤모드를 활성화합니다.
그리고 w, a, s, d 키를 눌러 화면을 스크롤합니다.
[Win+s] 키는 잠시 작동을 멈춥니다. 이 상태에서는 다시 w, a ,s, d 키를 일반적인 문자키로 사용할 수 있습니다.
자시 [Win+a]키를 누르면 스크롤 모드가 활성화됩니다.
[Win+x]키를 누르면 종료합니다.
작동 화면 캡쳐입니다.
첨부파일 참고하세요.