看板 WindowsPhone 關於我們 聯絡資訊
Surface Pen (SP4版)的頂按鈕(top button)可用AutoHotKey(AHK)重新定義功能。 網路上有人找到對應的AHK key symbol,所以可以輕鬆重定。 (我之前在板上有介紹AHK這套軟體: #1MUFlaRM) 我以桌面版PowerPoint為例,寫了一個script,它可以按一下頂按鈕, 讓筆在PowerPoint的Presentation mode中切換劃筆與雷射筆。連按兩下,換下一張 slide。長按一下,換上一張slide。PowerPoint以外的程式則維持原功能。script如下: ; Redefine Surface Pen (SP4) top button for PowerPoint Presentation mode. ; Initialized global variables. class gv { static penMode := 0 } ; Single click for switching between pens. #F20:: ; Programs except PowerPoint. If !WinActive("ahk_exe POWERPNT.exe") { Send, #{F20} Return } ; Switch to Laser Pen. If (gv.penMode == 0) { Send, ^l gv.penMode := 1 } ; Switch to Pen. Else { ; Sleep for a while before sending ^p. ; Otherwise, sometime PowerPoint goes back one page. ; I don't know why. Sleep, 50 Send, ^p gv.penMode := 0 } Return ; Double clicks for next slide. #F19:: ; Programs except PowerPoint. If !WinActive("ahk_exe POWERPNT.exe") { Send, #{F19} Return } Send, {Right} Return ; Long press for previous slide. #F18:: ; Programs except PowerPoint. If !WinActive("ahk_exe POWERPNT.exe") { Send, #{F18} Return } Send, {Left} Return 比較妙之處是我發現在切換筆時,如果太快切,^p有時會變成回上一頁投影片, 後來加個Sleep就解決了:) 此script適用S3 + SP4 Pen。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.45.106.137 ※ 文章網址: https://www.ptt.cc/bbs/WindowsPhone/M.1454151742.A.680.html
TsaoCCFGOGO: 推,狂專業的 01/30 19:52
※ 編輯: zxvc (114.45.106.137), 01/30/2016 21:21:59
zxvc: 修改了一下script。發現切到雷射筆後,觸控也會變電射筆, 01/30 21:22
zxvc: ,不再能滑動切換投影片。所以只好改成用筆按鈕切換上下頁 01/30 21:23
zxvc: 跟切換筆功能。 01/30 21:23
yoyomanman: 太厲害了!!!!推! 01/31 14:37
※ 編輯: zxvc (114.43.61.181), 02/01/2016 23:42:39