Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Command to move email to new folder

Just "upgraded" to High Sierra over weekend. One of my most used commands seems to have disappeared. Within the Mail app, dozens of times every day I would use the command option-command-T to move an emall from my inbasket or my sent basket to whichever folder I wanted to store it in, as long as the last moved file went to the same folder. Very fast and more efficient than using the "Move to" command for multiple moves to the same folder.


Option - Command-T seems to have disappeared. Does anyone know how I can get it back? If not, does anyone know a work around for it?

Mac mini, macOS Sierra (10.12.4)

Posted on Dec 11, 2017 1:05 PM

Reply
Question marked as Best reply

Posted on Dec 12, 2017 6:47 AM

Since the name of the menu command changes, I can only come up with one idea to create a shortcut for that command. I used UI Scripting to click on that menu item, and used an Automator Service to call the AppleScript app from a shortcut.


Using Script Editor, create a new script with this code:

tell application "System Events"

tell process "Mail"

set MoveToAgainMenu to every menu item of menu "Message" of menu bar 1 whose name starts with "Move to" and name ends with "Again"

click (item 1 of MoveToAgainMenu)

end tell

end tell

Save the script as an Application with any name you wish to use (I used "Move Again")

I saved mine in my user/Library/Application Scripts/com.apple.mail folder.


Create a new Automator Service that receives no input from application Mail

Drag in a "Run applescript" action from the Utilities Library.

Set the code in that AppleScript to:

on run {input, parameters}

tell application "Move Again" to run

end run

Save that with any name you want, including the same as your AppleScript.


Open Keyboard System Preferences, select Shortcuts tab

Select Services from the list on the left.

Find your Service name in the list and add the shortcut you want. I think cmd-opt-T hides and shows the favorites bar.

Open Security & Privacy System Preferences.

Select Privacy Tab.

Select Accessibility

Find where you saved your AppleScript app and drag it into the Allow list.


When you first run the script, it will ask to find the App you created ("Move Again" in my case).

Click the Browse button and find the app your created. That lets the AppleScript know what app to run. It will remember after the first time.

7 replies
Question marked as Best reply

Dec 12, 2017 6:47 AM in response to NeilKo

Since the name of the menu command changes, I can only come up with one idea to create a shortcut for that command. I used UI Scripting to click on that menu item, and used an Automator Service to call the AppleScript app from a shortcut.


Using Script Editor, create a new script with this code:

tell application "System Events"

tell process "Mail"

set MoveToAgainMenu to every menu item of menu "Message" of menu bar 1 whose name starts with "Move to" and name ends with "Again"

click (item 1 of MoveToAgainMenu)

end tell

end tell

Save the script as an Application with any name you wish to use (I used "Move Again")

I saved mine in my user/Library/Application Scripts/com.apple.mail folder.


Create a new Automator Service that receives no input from application Mail

Drag in a "Run applescript" action from the Utilities Library.

Set the code in that AppleScript to:

on run {input, parameters}

tell application "Move Again" to run

end run

Save that with any name you want, including the same as your AppleScript.


Open Keyboard System Preferences, select Shortcuts tab

Select Services from the list on the left.

Find your Service name in the list and add the shortcut you want. I think cmd-opt-T hides and shows the favorites bar.

Open Security & Privacy System Preferences.

Select Privacy Tab.

Select Accessibility

Find where you saved your AppleScript app and drag it into the Allow list.


When you first run the script, it will ask to find the App you created ("Move Again" in my case).

Click the Browse button and find the app your created. That lets the AppleScript know what app to run. It will remember after the first time.

Dec 12, 2017 5:47 PM in response to NeilKo

I forgot to explain why I had to do the "two-step" process. Theoretically, an Automator Service could run the necessary AppleScript, but I couldn't allow it to control the Mac. I had to create the AppleScript Application because you can give an Application permission to control the Mac through Accessibility. The Automator Service just runs the App which has permission to activate the menu items.

Dec 23, 2017 2:47 PM in response to Barney-15E

Hi Barney, sorry for the delay. I've made it through the AppleScript without problems. I've compiled the Automator as indicated, however, I saved it as a Workflow, and I'm not sure that is the correct bucket. Also, I've saved it into the same Library location as the Script, but I'm not sure that is correct, either. When I go to the Shortcuts Tab, I cannot find it. Please advise what I've done wrong. I will appreciate it if you can get me back on track. Thanks.

Dec 24, 2017 7:10 AM in response to Barney-15E

Hi Barney. I can see where I went wrong. My bad. I've hit another obstacle, however. I've corrected my Automator to a Service and saved it. I've gone to Keyboard Preferences to load the cmd-shift-t.


When I go to Accessibility and unlock it to accept a new "control your computer" app, however, I try dragging and dropping my .scpt, and my Accessibility window will not accept. So, I then went to the "+" sign to try to take it into the window that way, however, my "file finder" inside of Accessibility cannot find Application Scripts in Accessibility for my SSD System Drive. Obviously, I can find it using the Go Dropdown to Library, but not when I try to follow the same path using the file finder.


Please advise. Thanks. Sorry to be such a bother, but I'm so close I can taste it.

Command to move email to new folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.