Tag Info

Hot answers tagged

3

Based on this from an old Applescript Release Notes on sandboxing… When sending commands to a sandboxed application, such as TextEdit in OS X Mountain Lion, parameters that refer to files must be of an explicit file-like type and not a bare string, or the target application will not be able to access the file. For example, file "Macintosh ...


1

Some (perhaps all) services are context specific. They will only be offered/enabled when they can be used. For example, a service that is meant to act on a piece of text will only offer itself when text is selected. You can try this yourself in Safari. Select a piece of text in Safari and check the Services menu, you should see numerous options including ...


1

This worked set appName to "username" set appPass to "password" tell application "System Events" repeat while exists (processes where name is "SecurityAgent") tell process "SecurityAgent" if exists (text field 1 of window 1) then set value of text field 1 of window 1 to appName set value of text field ...


1

Basically you want to find a bunch of files which are empty (have size 0 bytes) and then change their content to "This file is empty". cd to/wherever/the/files/are find . -type f -size 0 -print | while IFS= read -r line; do echo "This file is empty" > "$line" done If instead you want to remove them, run cd to/wherever/the/files/are find . -type f ...



Only top voted, non community-wiki answers of a minimum length are eligible