In Finder, I can reopen a tab or window I just accidentally closed by going into the Go > Recent Folders
menu and pick one of the recent folders from the list.
I'd like to open it with shortcut ⌘ ⇧ T instead, but I'm not sure how to approach this.
- Can I bind a key combo to a menu item with a variable name? If yes, how does that work?
- If not, are there any options to do this in a shell command or with AppleScript?
Thanks!
EDIT: I've found that BetterTouchTool allows adressing menu items with variable names/labels, but now I need to predict the position of the last closed tab in the A-Z sorted list of recent locations.
Enter the path to the menubar item you want to click, separated by >semicolons. For example: "File;New:Window" (without the quotes!) will trigger the menubar item named "Window"
You can also trigger a menu-item by it's position (e.g. if the title >varies). For example: "File; (2)" will trigger the second item in the >File menu. "(2);(2)" will trigger the second item in the File menu. >Just always put the position in parentheses.
If an item can have multiple names based on it's state (e.g. hide >and show) you can use || to toggle one of them. For example >Edit;Start Dictation|l Cancel Dictation will either start or cancel >dictation :-)
Additionally you can use a wildcard if a menu-item has variable parts
The Go > Recent Folders
menu: no way to tell the position of the last closed folder due to this list being sorted by name: