Mac Os X Photos Closing The Library
Watching Folders
- Mac Os X Photos Closing The Library Of Life
- Mac Photo Library Location
- Mac Os X Photos Closing The Library Message
- Apple Mac Os X
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.
Jul 12, 2017 Apple’s new Photos application was released as part of a recent system update. By default, Photos creates its library in your Pictures folder, but it can be easily moved or newly created. There are any number of reasons you might want to create a new Photos library or move it to another location. Nov 11, 2019 Once in a while, for no apparent reason, you may encounter the SPOD (Spinning Pinwheel of Death). It's that multicolored pinwheel mouse pointer that signifies a temporary delay while your Mac tries to figure something out. In this case, your Mac is trying to think but nothing happens, so the pinwheel keeps spinning, and spinning, and spinning.
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
Answer librt.a is the System V name of the library containing the POSIX Advanced Realtime RT Option functions. The specific function you are asking about is part of the TMR option. If Mac OS X supported it, it would be in libSystem.B,dylib, not librt.a. The function in question is not supported by Mac OS X. Per Nate's answer, a completely static application is apparently not possible - see also man ld:-static Produces a mach-o file that does not use the dyld. Only used building the kernel. The problem in linking with static libraries is that, if both a static and a dynamic version of a library are found in the same directory, the dynamic version will be taken in preference. Library not found for mac. Jul 04, 2015 I'm running in Mac OS 10.6.8 on a Mac Pro 1.1. I just installed Microsoft Office 2011 (yeah, I know). Macro fails with 'Cannot find project or library'. Can anyone tell me what project or library can't be found or offer any advice on next steps. If Mac photos the library could not be opened or it is showing unexpected errors, then Photos Library Repair Tool is one of the best ways to fix it. This is a built-in repair tool, comes with macOS and it. I installed git 1.7.4.4 long time ago. And I want to upgrade to git 1.7.11. However, when I run sudo make prefix=/usr/local install it gives this error: ld: library not found for -lintl.
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.
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
Mac Os X Photos Closing The Library Of Life
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
Yesterday a reader left a question for me. It’s related to iPhoto. Well, I’ve to admit that I’m using Photos (yes, the upgraded version of iPhoto). Anyhow?
The question:
“Hi Tysa, I upgraded my old MacBook Pro to the OS 10.11 El Capitan, and now the iPhoto app won’t open. It says the version of iPhoto installed on my Mac is not compatible with the current OS X. And it asks me to download the latest version for free from the Mac App Store. I’m not sure what I should do. I don’t want to lose any precious photos. Please help.”
The solution:
Well, as far as I can recall. I faced similar problem while I was upgrading OS X Mavericks to Yosemite. The iPhoto app wouldn’t open, and it was resolved after download the new Photos app. Yes, according to Apple official announcement, starting with OS X Yosemite v10.10.3, every Mac now includes the Photos app.
I had no problem upgrading iPhoto to Photos app, and all my pictures were 100% kept intact there (thank God, had I known it would cause photo loss, I would have hesitated). So, I’d assume it’s safe to do so. But, just in case it’s best to backup all your pictures before proceeding.
Mac Photo Library Location
How to upgrade iPhoto to Photos and migrate all pictures
Matt Elliott from CNET has contributed an excellent guide on how to move your photos and videos from iPhoto to the new Photos app, the details about iCloud Photo Library, how to optimize storage, and what you can do with your old iPhoto library.
Also, iDB has shot a great YouTube video which explains pretty much the same thing. If you are under Wi-Fi, watch it.
In the meanwhile, many users reported that the new Photos app is less intuitive, and it took time to get acquainted with using new software. If so, you can continue to use iPhoto but it has some restrictions on the versions you can use, and you have to reinstall the iPhoto app.
How to reinstall iPhoto app on Mac El Capitan
If you are not a fan of the new Photos app, Ross McKillop from SimpleHelp has a step-by-step guide that shows you how to re-install iPhoto on OS X El Capitan. Initially, the guide was written for OS X Yosemite, he later updated the post and claimed it works on OS X 10.11 as well.
Mac Os X Photos Closing The Library Message
No matter which way you go for, you shouldn’t have any problems opening iPhoto (or Photos).
Apple Mac Os X
One last tip: do make regular backups of your precious pictures.