Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

How to AppleScript closing current tab of front window?

more options

What is the AppleScript command to simply close the currently displayed tab of the front window?

What is the AppleScript command to simply close the currently displayed tab of the front window?

선택된 해결법

I can't hold out high hopes: adding more AppleScript support has been on in the bug tracking system for 17+ years and doesn't seem to have any momentum. Probably your best bet for now is to find hacks other people have posted rather than waiting for a more complete API on Firefox's side.

문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (5)

more options

How does AppleScript work? Can it emulate keyboard action? The keyboard shortcut to close the current tab is Command+w (on Windows, it's Ctrl+w).

more options

This works but it's not ideal:

tell application "Firefox" to activate tell application "System Events" to keystroke "w" using command down

A more complete AppleScript dictionary for Firefox would be the preferred solution.

more options

GRobLewis said

A more complete AppleScript dictionary for Firefox would be the preferred solution.

Where would that come from?

more options

AppleScript support is compiled into a Mac application.

more options

선택된 해결법

I can't hold out high hopes: adding more AppleScript support has been on in the bug tracking system for 17+ years and doesn't seem to have any momentum. Probably your best bet for now is to find hacks other people have posted rather than waiting for a more complete API on Firefox's side.