[-GC-] PttChrome和其他網頁使用不同的手勢操作

作者: mayuyu ((・ω・)ノ)   2014-12-28 18:59:19
在Firefox底下使用BBSFox+FireGestures的時候有一個功能,
那就是可以設定BBSFox和其他網頁的頁面使用不同的滑鼠手勢動作,
例如「←」按住滑鼠右鍵往左滑動的這個手勢,可以設定成在
一般網頁裡是執行「回到上一頁」的動作,
在BBSFox頁面底下則是變更為執行送出鍵盤的方向左鍵「←」。
而「→」按住滑鼠右鍵往右滑動的這個手勢,在一般網頁裡是執行
「前進到下一頁」的動作,在BBSFox頁面底下則是變更為
送出鍵盤的方向右鍵「→」。
我個人習慣是設定在一般網頁裡「↓」為跳到頁尾,「↑」是回到頁首,
但是在BBS裡向下一頁PageDown和向上一頁PageUp比較常用,
所以在BBSFox頁面底下,滑鼠手勢「↓」和「↑」則變更為送出
PageDown和PageUp,另外二個手勢「﹁往右然後往下」
和「﹂往左然後往上」才是End和Home。
可是在Chrome底下沒有可以區分不同分頁指定不同手勢的擴充,
而且Chrome的擴充手勢不能在Chrome的新分頁、設定頁面、
Chrome 線上應用程式商店、應用程式等頁面底下執行,
手勢操作不能全域使用,很不方便。
所以使用另外的系統全域手勢軟體來執行手勢操作,
應該會比用擴充手勢來得好。
我是用StrokesPlus,因為有在更新和支援Windows 8.1和64bit,
StrokesPlus可以指定作用的Window Title,
讓PttChrome的頁面可以使用獨立的滑鼠手勢設定。
例如「回到上一頁」和「在PttChrome底下送出方向左鍵」
Lua script可以寫成:
local currentWindowTitle = acGetWindowTitle(nil, gsx, gsy)
if currentWindowTitle == "ptt.cc - Google Chrome" or currentWindowTitle ==
"ptt.cc:443 - Google Chrome" or currentWindowTitle == "ptt2.cc - Google
Chrome" or currentWindowTitle == "ptt2.cc:443 - Google Chrome" then
acSendKeys("{LEFT}")
else
acSendKeys("{BROWSERBACK}")
end
同樣「跳到頁尾」和「在PttChrome底下送出PageDown」
Lua script可以寫成:
local currentWindowTitle = acGetWindowTitle(nil, gsx, gsy)
if currentWindowTitle == "ptt.cc - Google Chrome" or currentWindowTitle ==
"ptt.cc:443 - Google Chrome" or currentWindowTitle == "ptt2.cc - Google
Chrome" or currentWindowTitle == "ptt2.cc:443 - Google Chrome" then
acSendKeys("{PGDN}")
else
acSendKeys("{END}")
end
這樣就可以做到類似BBSFox+FireGestures的功能了,
不過BBSFox+FireGestures還有一些操作,例如在原地就可以彈出
分頁瀏覽紀錄、所有分頁列表和已關閉分頁的快顯列表...等等,
用Chrome+StrokesPlus還是沒有辦法做到一模一樣,
整體來說我覺得還是FireGestures比較順手和方便。

Links booklink

Contact Us: admin [ a t ] ucptt.com