AutoHotkey與Google+ Commander合用-以滑鼠移動訊息位置

周五下午在忙碌告一段落後,打開Google+瀏覽社交圈分享了那些訊息。為了方便瀏覽就加了一段Autohotkey設定,讓按〔滑鼠中鈕〕(Middle Button)跳到下一則訊息,〔Shift中鈕〕則往上一則訊息,同時也將Google Reader設置了相同功能。當方便用鍵盤時,就用j/k鍵(Google Reader則是n/p鍵),不想按鍵盤就按滑鼠中鈕。

Google+是透過Google+ Commander來達成,如果使用Firefox則必須先安裝GreaseMonkey:

 $MButton::
  WinGetClass,sClass,A
  ;;MsgBox $%sClass%$
  ;; FM=7-zip window
  if (sClass="TFcFormMain" || sClass="FM") {
    Send, {BS}
  } else if (sClass="CabinetWClass" || sClass="#32770") {
    Send, !{up}
  } else if (sClass="MozillaWindowClass" || sClass="Chrome_WidgetWin_0") {
    WinGetTitle, sTitle, A
    if (InStr(sTitle, "Google+") > 0 || InStr(sTitle, "Gmail") > 0) {
      Send {j}
    } else if (InStr(sTitle, "Google 閱讀器") > 0) {
      Send {n}
    }
  }
  return

;; Google+ Shift+Mbutton up one post
$+MButton::
  WinGetClass,sClass,A
  ;;MsgBox $%sClass%$
  ;; FM=7-zip window
  if (sClass = "MozillaWindowClass" || sClass="Chrome_WidgetWin_0") {
    WinGetTitle, sTitle, A
    if (InStr(sTitle, "Google+") > 0 || InStr(sTitle, "Gmail") > 0) {
      Send {k}
    } else if (InStr(sTitle, "Google 閱讀器") > 0) {
      Send {p}
    }
  }
  return

##

您可能也會有興趣的類似文章

簡睿

服務於軟體業的資訊老兵。興趣廣泛,學習力佳,樂於分享所知所學。

您可能也會喜歡…

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *