Join the Mozilla’s Test Days event from 9–15 Jan to test the new Firefox address bar on Firefox Beta 135 and get a chance to win Mozilla swag vouchers! 🎁

Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Μάθετε περισσότερα

How to AppleScript closing current tab of front window?

  • 5 απαντήσεις
  • 1 έχει αυτό το πρόβλημα
  • 105 προβολές
  • Τελευταία απάντηση από jscher2000 - Support Volunteer

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.