Safari“검색 탭”키보드 단축키 텍스트를 입력하여

Safari 8의 새로운 “검색 탭”기능은 매우 훌륭합니다. “모든 탭 표시”가 활성화되면 텍스트를 입력하여 원하는 탭으로 탭을 필터링 할 수 있습니다. 그러나 단일 탭이 표시되면 해당 탭을 활성화하는 것이 매우 좋습니다. 이렇게하면 탭에 “스포트라이트”유형 기능이 허용됩니다.

그러나 검색 한 후에 탭을 활성화하는 키보드 단축키가없는 것 같으므로 마우스로 탭을 클릭해야합니다! 이것은 감독처럼 보입니다 .Apple이 탭을 필터링하는 좋은 방법을 추가 할 것이라고는 믿을 수 없지만 탭을 선택할 수있는 방법은 없습니다!

스크린 샷 :

여기에 이미지 설명을 입력하십시오



답변

이 작업을 수행하기 위해 다음 키 조합을 시도했지만 아무런 효과가 없습니다.

  • Command + Return … + 스페이스
  • Option + Return … + 스페이스
  • Control + Return … + 스페이스
  • Command + Shift + \ (Macbook의 “모든 탭 표시”명령)

이로 인해 실제로 애플 측의 감독이라고 믿게되었습니다.

Kludge : 마우스 클릭을 시뮬레이션하는 자동화 명령 생성

https://discussions.apple.com/thread/3708948 에서 찾은 코드를 사용 하여 다음 AppleScript를 구성했습니다.

시도 1 : 작동하지 않습니다
“Command + Control + Shift + 4″를 눌러 얻은 숫자를 사용하여 “Command + Shift + Option + Control + Space”에 매핑 된 Automator Service에 래핑 된 Applescript에서이 코드를 실행했습니다. 영역의 주소를 가져옵니다 (왼쪽에서 가로 600 픽셀, 위쪽에서 세로로 300 픽셀). 일반적인 Safari에서 작동합니다 (키 조합을 누르면 해당 픽셀 주소에서 마우스 클릭이 발생 함). Safari의 “모든 탭 표시”모드에서 동일한 키 명령이 실행되었습니다!

on run {input, parameters}
    tell application "System Events"
            tell process "Safari"
                click at {600, 300}
            end tell
        end tell

        return input
    end run

시도 # 2 : 효과 는 있지만 실현 불가능

Automator Service에 싸인 다음 Applescript로 작동하는 주요 명령을 얻었지만 완료하는 데 5.125 초가 걸렸습니다. (

    on run {input, parameters}

    set x to 600
    set y to 150

    do shell script "
/usr/bin/python <<END
import sys
import time
from Quartz.CoreGraphics import *
def mouseEvent(type, posx, posy):
          theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
          CGEventPost(kCGHIDEventTap, theEvent)
def mousemove(posx,posy):
          mouseEvent(kCGEventMouseMoved, posx,posy);
def mouseclick(posx,posy):
          mouseEvent(kCGEventLeftMouseDown, posx,posy);
          mouseEvent(kCGEventLeftMouseUp, posx,posy);
ourEvent = CGEventCreate(None);
currentpos=CGEventGetLocation(ourEvent);             # Save current mouse position
mouseclick(" & x & "," & y & ");
mousemove(int(currentpos.x),int(currentpos.y));      # Restore mouse position
END"
    return input
end run

답변

나는 당신의 대답을 얻었다 고 생각합니다. 나는 이것을 하루 종일 보냈다. 모든 애플 기기에 추가 제스처와 바로 가기를 추가하기 위해 BetterTouchTool (OS X 10.10 사용)이라는 무료 앱을 사용합니다. 지체없이!

구성해야 할 각 단계마다 스크린 샷을 만듭니다. 참고 : Safari를 사용할 때 마우스 위치를 선택한 키보드 단축키로 바인딩합니다. 단점 : 사파리의 창 위치를 변경할 수 없으며 마우스의 위치가 노트북의 모니터와 다릅니다. 해결책 : 마우스를 가장 많이 사용하는 화면과 함께 전체 화면으로 마우스 위치를 매핑하는 것이 좋습니다 (또는 각 화면마다 두 개의 바로 가기를 매핑하십시오)

  • 1 앱 다운로드 http://www.bettertouchtool.net

  • 2 앱을 열고 키보드를 선택하고 추가 할 바로 가기 (이 경우 Safari)에 나열 할 앱을 추가 한 다음 바로 가기를 선택합니다 (이 스크린 샷에서 “Option + 1″을 매핑합니다). 메뉴 에서 “기타 Mouser 작업”에서 ” 마우스를 위치로 이동 “을 선택하십시오 . 스크린 샷에서 잘못된 옵션을 표시했습니다. 위의 옵션입니다. “마우스 위치 저장”이 아닙니다. 너무 피곤해서 미안해 3 시야 내일 일해야 해

  • 3 커서를 이동할 위치를 선택하십시오 (UI가 ~ 3 개의 결과를 표시 할 때 입력 상자의 위치가 첫 번째 결과를 확인합니다)

  • 4 다음 이벤트를 추가하십시오. 왼쪽 클릭 이벤트. 그리고 그게 다야!

두 번째, 세 번째 결과를 얻으려면 다른 마우스 위치를 사용하여 동일한 작업을 수행하십시오. 그러나 더 큰 결과 인 경우 UI가 변경되어 때로는 첫 번째 결과를 숨길 수도 있습니다.


답변

나는이 기능을 추가하기 전에 Applescript를 사용 하여이 작업을 수행했습니다.

http://hea-www.harvard.edu/~fine/OSX/safari-tabs.html

검색 대화 상자가 나타나고 검색을 입력하면 일치하는 단일 탭이 즉시 활성화되거나 일치하는 탭 목록에서 선택할 수있는 대화 상자가 나타납니다. 창을 앞으로 가져 와서 창의 활성 탭으로 만듭니다.

(터미널 창을 찾는 비슷한 스크립트가 있습니다.)


답변

나는 파티에 조금 늦었지만 Shortcat 이 필요한 기능을 수행 할 것이라고 생각 합니다.

메일 등에서 사용할 수있는 추가 보너스


답변

Automator를 사용하여 다음에 설명 된대로 AppleScript를 키보드 단축키에 첨부하십시오.

작성한 AppleScript에 키보드 단축키를 어떻게 할당합니까?

set question to display dialog ("Find Safari tab:") default answer ""
set searchpat to text returned of question

tell application "Safari"
    set winlist to every window
    set winmatchlist to {}
    set tabmatchlist to {}
    set tabnamematchlist to {}
    repeat with win in winlist
        set ok to true
        try
            set tablist to every tab of win
        on error errmsg
            --display dialog name of win as string
            set ok to false
        end try
        if ok then
            repeat with t in tablist
                if searchpat is in (name of t as string) then
                    set end of winmatchlist to win
                    set end of tabmatchlist to t
                    set end of tabnamematchlist to (id of win as string) & "." & (index of t as string) & ".  " & (name of t as string)
                    --display dialog name of t as string
                else if searchpat is in (URL of t as string) then
                    set end of winmatchlist to win
                    set end of tabmatchlist to t
                    set end of tabnamematchlist to (id of win as string) & "." & (index of t as string) & ".  " & (name of t as string)
                    --display dialog name of t as string
                end if
            end repeat
        end if
    end repeat
    if (count of tabmatchlist) = 1 then
        --display dialog "one!"
        set w to item 1 of winmatchlist
        set t to item 1 of tabmatchlist
        set current tab of w to t
        set index of w to 1
    else if (count of tabmatchlist) = 0 then
        display dialog "No matches"
    else
        set whichtab to choose from list of tabnamematchlist with prompt "The following tabs match, please select one:"
        set AppleScript's text item delimiters to "."
        if whichtab is not equal to false then
            set tmp to text items of (whichtab as string)
            set w to (item 1 of tmp) as integer
            set t to (item 2 of tmp) as integer
            set current tab of window id w to tab t of window id w
            set index of window id w to 1
        end if
    end if
end tell