Skip to content

Various Automator and AppleScript workflow and scripts for simplifying life

Notifications You must be signed in to change notification settings

princelundgren/automator-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automator

Automator and AppleScript programming!
My collection of favourite scripts and workflows for my productive Mac!

Projects:

Create Text File

Right-click any file or folder in Finder and click "Create Text File"(located in services) to create a new text file "Untitled.txt".
Install the workflow as service.

Open file/folder in Visual Studio Code

Right-click any file or folder in Finder and go to "Quick Actions" -> "Open in Visual Studio Code". If you open a folder, then it will open a new Visual Studio Code window with the folder. If you open a file, it will open the file in a new tab if you are already have an existing Visual Studio Code window. Install the workflow as service.

PDF from images

Right-click one or several images in Finder and choose the service to convert/merge them into one PDF.
The PDF created has the same file name as the first image chosen and is placed in the same folder
as the original images(s).
Install the workflow as a service.

Merge PDF Pages

Right-click one or several PDFs in Finder and choose the service to merge them into one PDF.
The PDF created has the same file name as the first PDF chosen and is placed in the same folder
as the original PDF(s).
Install the workflow as a service.

Compress PDF Size

Right-click one or several PDFs in Finder and choose the service to compress images in the PDF to a smaller size.
There is Smaller, Medium and Larger variants of the service. Larger has better quality than Smaller and Medium but also has larger file size.
The "Larger-variant can make a PDF twice as small while keeping almost the same quality. The "Smaller"-variant can turn a 90 Mb PDF file into a 200Kb one!
Install the workflow as a service.

Add to Alfred blocklist / Remove from Alfred blocklist

Add any file to Alfred blocklist by just rightclicking the file in Finder. Use the script
"Remove from Alfred blocklist" to remove the file from the blocklist.
Install as service.

Copy path as text

Rightclick any file in Finder and click "Copy path as text" to get file path to clipboard! Install as service.

Download subtitles(with FlixTools App)

First download and install the FlixTools App and then install the script
Then rightclick and movie yout want to search subtitles for, it will search and
download the subtitles file next to the movie then it will automatically exit the program.
It gives notifications when running, and another notification if the download was successful or not.

Download subtitles(with Subtitles App)

First download and install the Subtitles App(https://subtitlesapp.com) then install the script
Then rightclick and movie yout want to search subtitles for, it will search and
download the subtitles file next to the movie then it will automatically exit the program.

Weekly Trash Emptying

If you have the bad habit of emptying the trash can instantly after deleting something, just to realize you deleted
something you actually needed, then consider this script.
You can add this script(Weekly Maintenance Trash Emptying) to a Calendar event, which runs when the Calendar event occurs.
If you schedule the Calendar event to run once a week, it will run the script once a week. You can completly stop emptying the trash can manually,
and when its time for the script to run, a popup will ask you if you want to empty the trash can. You'll train yourself to stop emptying
the trash can, so some day when you find that something is missing, you'll be able to use the trash can to check if you accidently deleted it.

Safari Private

Easily start a Private session in Safari by clicking an .app.
If Safari is already open with a normal window, this script open a new window in Private mode.
To make a .app, open the script and export the script as Application.

Google Chrome Incognito

Easily start an Incognito session in Google Chrome by clicking an .app.
If Google Chrome is already open with a normal window, this script open a new window in Incognito.
To make a .app, open the script and export the script as Application.

Chromium Incognito

Easily start an Incognito session in Chromium by clicking an .app.
If Chromium is already open with a normal window, this script open a new window in Incognito.
To make a .app, open the script and export the script as Application.

Firefox Private Browsing

Easily start a Private Browsing session in Firefox by clicking an .app.
If Firefox is already open with a normal window, this script open a new window in Private Browsing.
To make a .app, open the script and export the script as Application.

Mount Hard Drive / Unmount Hard Drive

I have two drives installed in my Macbook, one SSD(for OS+software) and one Harddrive(for media files).
I want to Mount and Unmount the drive whenever I want. I want to unmount the Drive so it instantly spin down. This way I can save battery-time, reduce noise of my computer, and safely move around the laptop without worrying about destroying my harddrive.
Export the Scripts as Applications, and just launch them to Mount/Unmount the Hard drive.
Don't forget to rename the drive name in the scripts. Mine is called "Hard Drive", yours might be called something else.

CustomDownloads

A Folder action service which automatically opens ".doc", ".docx", ".ppt", ".xls", ".dot", ".torrent"-files when downloaded from a browser to "Downloads folder".
Copy the script to "/Users/Prince/Library/Workflows/Applications/Folder Actions/".
Then rightclick the Downloads-folder and go to "service -> Folder action setup".
Mark the "Downloads" in the left area then press the "+"-sign and add the script.

Move downloaded apps to apps-folder

A Folder action service which moves .app applications automatically to /Applications folder.
Double-click and install as service.

Convert to JPG

Rightclick and image and select the service, then it will duplicate the image and
convert it image to JPG. There are different workflows for different resolutions. 1920p converts the size to 1920p, while "Preserve" preserves the resolution after conversion.
Install the workflows as services.

Search With Private Safari

Rightclick any text or link in MacOS and choose this service to open a new
Private Safari windows with the text/link that is selected Install the workflow file as a service.

Search with YouTube

A service which allows you to rightclick any text on your Mac and do a YouTube search of the text if you click the "Search with YouTube".
It opens the search in a new tab.
Install the workflow file as a service.

Search with ThePirateBay

A service which allows you to rightclick any text on your Mac and do a ThePirateBay search of the text if you click the "Search with ThePirateBay".
It opens the search in a new tab.
Install the workflow file as a service.

Search with Google / Open direct link

A service which allows you to rightclick any text on your Mac and do a Google search of the text if you click the "Search with Google".
But if it really is a direct link(contains some of the popular stuff like http, https, .com, .org etc) then open the link directly. You can add more types yourself by editing the workflow.
It opens the search/link in a new tab.
Install the workflow file as a service.

Convert video to 1080p(Google Cardboard compatible)

In finder, right click a video and go to Services -> Convert video to 1080p(Google Cardboard compatible)
This will convert the video to simple small sized 1080p video, which is compatible with most software/devices.
For instance it is compatible with Google Cardboard players(I recommend AAA VR Player for Android), VLC on Mac & Android etc.

Start Counter-Strike:Global Offensive with high CPU priority

Use this script to start CS:GO with high CPU priority for better gaming performance.
Export the script as .app for easier launch.

Crop image to 1080p

Crop the image to the resolution of 1920x1080. Doesn't matter what resolution the image is, it will be fored to 1080p resolution. Great for making wallpapers.

Crop image to 720p

Crop the image to the resolution of 1280x720. Doesn't matter what resolution the image is, it will be fored to 720p resolution. Great for making wallpapers.

WinRunProgram

A simple example for starting a Wine program. This example shows how to start Matlab R2013B(Windows version)

Voice command tags example

A simple program to show you how to add "listening tags" to the Speech Recognition of MacOS.
When launched, it will ask you "How are you?". If you say Good, Fine or OK then it knows you mean you're fine, and will say
"Wonderful sir… Is there anything you want me to do?". If you say Bad, Depressed or Frustrated the response will be
"Clear up, chap! Is there anything you want me to do?"

Voice command tags example 2

A simple program to show you how to add "listening tags" to the Speech Recognition of MacOS.
When launched, it will ask you "What should I do?", if you say Google then google.com will open. If you say YouTube then Youtube.com will open.

Extra tip: How to change the .app logo of exported Workflows/Applescripts

First you need to have a logo with the ".icns" format(download here http://www.iconarchive.com/)
Rightclick .app, then press "Get Info".
Drag and drop your logo to the tiny logo in the top-left corner of the window
Done!