Mac Automator Launch App Watch Folder
Launchpad was part of Apple's 'Back to the Mac' initiative, which sought to make the desktop more like the iPad. It's for everyone who wants a Home screen-like launcher on macOS, and a way to see, start, search for, delete, and otherwise manage apps on the Mac.
How to launch an app in Launchpad on Mac
Creating an application in Automator. To create a simple application with Automator, launch the application and follow these steps: Click the New Document icon. Select Application and click the Choose button. Click the desired application in the Library list. Automator displays the. Let your Mac do repetitive tasks for you. If you need to make the same changes to multiple files—such as changing filenames or resizing images—or archive or back up important files, you can create a custom workflow and have your Mac do the work for you. In this article, we'll show you how to use the macOS Automator app to create a very simple Folder Action that will automatically convert images dropped into a specific folder, without you ever. Automator Basics Launch Automator, located at /Applications. An Open dialog box will appear. Click the New Document button. If you’ve used Automator before, and it opens to an existing workflow, select New from the File menu. A sheet will open displaying the type of workflows you can create.
- There are three ways to enter Launchpad:
- Click on the Launchpad icon in your Dock (it looks like a rocket).
- Do a four-finger pinch gesture on your trackpad.
- Press the Launchpad button on your Apple keyboard (look like a 3x2 grid of icons, and is also labeled F4).
Click on the app you want to launch.
How to search an app in Launchpad on Mac
If you have a lot of apps installed you can easily search for them in Launchpad
- Open launchpad.
- Select the search bar at the top center of the Launchpad screen.
Enter the name of the application you wish to find.
You will notice that as soon as you start typing, Launchpad will begin filtering the results, so in most cases you shouldn't even have to type the entire name of the app to find it.
How to move apps in Launchpad on Mac
If you want to have all your favorite and most used apps in a certain location in Launchpad, you can easily move them around to arrange them however you want.
- Open launchpad.
Click and hold the app you wish to move until it starts wiggling.
Drag the app to your new desired location.
How to organize apps into folders in Launchpad on Mac
You can put apps into folders — which are a group of apps —to better organize your Launchpad. It's perfect for putting similar apps together.
- Open launchpad.
Click and hold on the app you wish to put in a folder until it starts wiggling.
Drag the app on top of another app you wish to put into the same folder until a white box appears around both apps.
Let go.
How to delete apps in Launchpad on Mac
You can certain apps on your Mac from Launchpad, which is a great way to keep your desktop clean and organized. Please note that you can't delete certain built-in apps or apps that are running in the background on your Mac.
- Open launchpad.
Click and hold the app you want to delete until it starts wiggling.
Click on the X that appears in the top-left corner of the app to delete it. If there is no X, the app cannot be deleted in Launchpad.
Mac software update locking up during restart. These tips may help you resolve your issue.before trying the tips below. If your Mac freezes after you login,. Simply press the Command+Option+Escape keys together (or click Force Quit from the Apple menu).
How to reset Launchpad on Mac
Sometimes after you install a new app (especially third-party apps) you may notice it doesn't show up in Launchpad. There is a way to manually refresh Launchpad, which will most likely resolve the issue.
- Click on your desktop.
- Click on the Go menu. It's up on the menu bar at the top of your screen.
- Press and hold the Option key.
Click on Library.
- Double click on the Application Support folder.
Double click on the Dock folder.
- Drag all files ending in .db into the trash.
Click on the Apple icon in the top left corner of your screen. It should look like this .
- Click on Restart.
Click on the Restart button.
Your computer will restart, and when it boots back up you should find all your apps available in Launchpad.
macOS Catalina
Main
We may earn a commission for purchases using our links. Learn more.
My heartThis timelapse of macOS 10.0 through 10.15 is a nostalgic wonder
The very first version of macOS, or Mac OS X as it was known, arrived almost 20 years ago. This video takes us through every major update the Mac has seen since in one amazing timelapse.
Watching Folders
The ability to watch folders and take action on incoming items is a powerful automation technique that enables the creation of fully unattended workflows. A watched folder might be used, for example, to watermark incoming photos, convert them to PDF, and email them to clients for review. Many companies set up script servers—dedicated robot machines that watch folders and process detected items, allowing employees to offload tedious and repetitious work in order to focus on other important tasks.
In OS X, there are two primary ways to set up scripting-based watched folders: folder actions and stay open script apps.
Using Folder Actions to Watch Folders
Folder actions is a feature in OS X that lets you connect scripts to folders on your Mac. A folder action script includes one or more event handlers that run in response to certain events, such as opening, closing, or adding items to the connected folder. With folder actions, you can create automated workflows that:
Notify you when new files and folders arrive in a folder
Notify you when existing files and folders are removed from a folder
Perform processing of newly detected files and folders
Initiate any automated task when a new file or folder is detected
Adjust or reset the view properties of a folder’s window when it’s opened, closed, or resized
Write a Folder Action Script
The event handlers supported by folder actions are defined in the Standard Additions scripting addition that comes with OS X. They are:
Folder event | Event handler | Parameters |
---|---|---|
Items—files or folders—are added to the folder |
|
|
Items are removed from the folder |
|
|
The folder is opened in a new Finder window |
|
|
The window of a folder is closed |
|
|
The window of a folder is moved |
|
|
Create a Script Editor document.
Add one or more folder action event handlers to the document.
Save the document as a compiled script to one of the following folders:
/Library/Scripts/Folder Action Scripts/
—The script can be used by any user.~/Library/Scripts/Folder Action Scripts/
—The script can be used by the current user only.
The following examples demonstrate how to use different folder action event handlers.
APPLESCRIPT
Listing 18-1AppleScript: Example of theopening folder
event handleron opening folder theAttachedFolder
-- Get the name of the attached folder
tell application 'Finder'
set theName to name of theAttachedFolder
-- Display an alert indicating that the folder was opened
activate
display alert 'Attention!' message 'The folder ' & (quoted form of theName) & ' was opened.'
end tell
end opening folder
APPLESCRIPT
Listing 18-2AppleScript: Example of theclosing folder window for
event handleron closing folder window for theAttachedFolder
-- Get the name of the attached folder
tell application 'Finder'
set theName to name of theAttachedFolder
-- Display an alert indicating that the folder was closed
activate
display alert 'Attention!' message 'The folder ' & (quoted form of theName) & ' was closed.'
end tell
end closing folder window for
APPLESCRIPT
Listing 18-3AppleScript: Example of theadding folder items to
event handleron adding folder items to theAttachedFolder after receiving theNewItems
-- Get the name of the attached folder
tell application 'Finder'
set theName to name of theAttachedFolder
-- Count the new items
set theCount to length of theNewItems
-- Display an alert indicating that the new items were received
activate
display alert 'Attention!' message (theCount & ' new items were detected in folder ' & (quoted form of theName) & '.' as string)
-- Loop through the newly detected items
repeat with anItem in theNewItems
-- Process the current item
-- Move the current item to another folder so it's not processed again in the future
end repeat
end tell
end adding folder items to
APPLESCRIPT
Listing 18-4AppleScript: Example of theremoving folder items from
event handleron removing folder items from theAttachedFolder after losing theRemovedItems
-- Get the name of the attached folder
tell application 'Finder'
set theName to name of theAttachedFolder
-- Count the removed items
set theCount to length of theRemovedItems
-- Display an alert indicating that items were removed
activate
display alert 'Attention!' message (theCount & ' items were removed from folder ' & (quoted form of theName) & '.' as string)
-- Loop through the removed items, performing any additional tasks
repeat with anItem in theRemovedItems
-- Process the current item
end repeat
end tell
end removing folder items from
Attaching a Folder Action Script to a Folder
A folder action script must be connected to a folder in order to use it. This is done with Folder Actions Setup, an app that’s launched from the Finder’s contextual menu.
Control-click the folder in Finder.
Choose Folder Actions Setup from the contextual menu.
The Folder Actions Setup app launches, the folder is automatically added to the Folders with Actions list, and you’re prompted to select a script.
Choose a script to connect to the folder and click Attach.
Make sure the Enable Folder Actions checkbox is selected, as well as the On checkboxes next to the folder.
Apple Automator App
Once the script and folder are connected, the folder action event handlers in the script should run when the corresponding actions occur.
Note
Folder Actions Setup can also be used to disable or remove folder action scripts and watched folders.
The Folder Actions Setup app itself resides in /System/Library/CoreServices/
.
Watching Folders Using an Idle Loop and a Stay Open Script App
Although folder actions provide efficient folder watching capabilities, some scripters prefer to implement customized folder watching workflows that provide more control over the folder watching process. This is typically done by creating a stay-open script with an idle
handler that checks a folder at regular intervals for new items to process. Listing 18-5 demonstrates an idle
handler-based script that watches an Input folder on the Desktop.
APPLESCRIPT
Listing 18-5AppleScript: Watch a folder for files using an idle loopon idle
-- Locate the folder to watch
set theFolder to locateAndCreateFolder(path to desktop folder, 'Input')
-- Watch the folder
watchFolder(theFolder)
-- Delay 2 minutes before checking the folder again
return 120
end idle
on watchFolder(theFolder)
-- Check for files in the folder
tell application 'Finder'
set theFilesToProcess to every file of theFolder
end tell
-- Stop if there are no files to process
if theFilesToProcess = {} then return
-- Locate an output folder
set theOutputFolder to locateAndCreateFolder(path to desktop folder, 'Output')
repeat with aFile in theFilesToProcess
-- Process the current file
-- Move the current file to the output folder so it doesn't get processed again
tell application 'Finder'
move aFile to theOutputFolder
end tell
end repeat
end watchFolder
-- Locate a folder, creating it if it doesn't exist
on locateAndCreateFolder(theParentFolder, theFolderName)
tell application 'Finder'
if ((folder theFolderName of theParentFolder) exists) = false then make new folder at theParentFolder with properties {name:theFolderName}
return (folder theFolderName of theParentFolder) as alias
end tell
end locateAndCreateFolder
Folder Watching Best Practices
Regardless of what method you use for folder watching, follow these best practices to produce an efficient and reliable workflow:
Wait for items to finish writing to disk before processing them.
Move processed items to an output folder so the same items aren’t detected and processed a second time.
Handle errors gracefully, such as by moving problematic items to an error folder so other processing can proceed.
Bring dialogs and alerts to the front so they’re visible and can be addressed.
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use Privacy Policy Updated: 2016-06-13