A collection of commands that may be from a CLI Shell, or programming language such as AppleScript, which are executed in order with limited iteration, usually as a way of automating actions or events.

learn more… | top users | synonyms (2)

0
votes
2answers
83 views

Combine files by name and zip

How can I automatically ZIP files with same file names (different extensions) into one ZIP? For example I have four files king.jpg king.txt queen.jpg queen.txt which would led to king.zip ...
1
vote
1answer
39 views

How can I get the window bounds for “Adobe Illustrator” in AppleScript?

Apparently, Adobe doesn't have a single mechanism in place for people using a laptop and additional monitors with their products. As an Adobe CC user who primarily works from a laptop that connects to ...
0
votes
0answers
15 views

How can I import a text file of emails into Mail?

I have thousands of emails from the nineties that were exported as a text file that I'd like to import into Mail. I'm looking for a way to do that directly or indirectly. I'm assuming it will require ...
1
vote
1answer
139 views

How to get user GUI input from BASH scripts?

From a BASH script I want to get user input and change system settings, in a loop. I first tried cocoaDialog but that has a fatal flaw: the dialogs are always on top of other windows. Ideally, I ...
1
vote
2answers
74 views

Shell script failing in Automator but works if I copy/paste into Terminal

Workflow I'm trying to achieve: Export SVG file from Adobe Illustrator to Desktop Drag SVG file from Desktop onto Automator Droplet Automator runs script (basic summary below) Script executes and ...
1
vote
2answers
56 views

How can I run an unsigned script in Automator

I can run the well-respected perl script exiftool from the command line in Terminal and achieve the desired result, but when I incorporate it in Automator as a Service I get a generic error message ...
0
votes
0answers
32 views

Encrypt password on disk for scripting

In the Microsoft Windows platform, there is a service called the Data Protection API (DPAPI), which allows developers to easily encrypt and decrypt values using a simple set of APIs. The encryption ...
0
votes
0answers
23 views

Disable sync services on battery

How to automatically disable sync services like Dropbox, Box, Eye-fi Helper, and Crashplan when I'm on battery power and re-enable it when I'm plugged back in? I've noticed my battery drains a lot ...
2
votes
1answer
30 views

Launch different apps based on file name (other than the extension)?

I'd like to have different apps handle .jpg files based on a naming convention I'll use for the .jpg files. Specifically most will go to Xee, but ones containing thumb should instead cause VLC to be ...
3
votes
1answer
26 views

How to run unix script in login screen before user logs in?

I would like to have unix script run when the login screen appears when booting. It should run immediately and not when user enters username and password and logs in. Is there any way to accomplish ...
0
votes
1answer
21 views

Using Tag how do I cut and parse file paths into tags

I'm using Tag and Hazel and I'd like to recursively go through files on our server, obtain their file paths and filenames and parse the whole thing into tags to apply to the file. Is there a shell ...
1
vote
2answers
42 views

Why am I not able to run my startup script upon login?

I’m using OS X Yosemite. I’m trying to run an sh script upon login, but I’m having problems. I created the following file in my /Library/LaunchAgents directory … -rwxr-xr-x 1 root wheel 604 Oct ...
0
votes
0answers
19 views

Startup Script Removal

Is there a good way to remove a script that was set to run at startup on a 10.10.5 macbook, that fails and never runs to completion? If the Script could complete normally it would remove itself, ...
1
vote
2answers
474 views

How to determine public temp directory on OS X to be write-accessible by www server?

I've MAMP running httpd server as _www and I'd like to assign the temporary directory as part of the shell script (bash). I've tried to use $TMPDIR as per these posts: How do I find the 'temp' ...
2
votes
1answer
93 views

How to evaluate the state of the OS X Server.app from a shell script?

I need to evaluate if the OS X Server.app has been installed and if it has been started or not. This I need to do from within a shell script. I could check for existing folder names, but I would ...
2
votes
1answer
101 views

Configure the OS X Server from .pkg postinstall script

I make a .pkg-installer for a product that extends the Apache server in OS X. From the postinstall script in the .pkg I'm currently able to configure the default setup of Yosemite and El Capitan, by ...
1
vote
0answers
81 views

Get latest Time Machine backup when backup disk is unplugged

I know i can get the time stamp of the latest Time Machine backup with the command tmutil latestbackup | grep -E -o "[0-9\-]+$" but this only works when my backup disk is plugged in. If not, i get the ...
0
votes
1answer
51 views

Detect mouse move or keystroke

Is it possible to make a program execute when the mouse is moved or any key is pressed?
4
votes
1answer
90 views

Automate Yosemite Upgrade

I want to be able to launch the Yosemite Installer app from the Applications folder and install the upgrade with commands. When I look inside the InstallESD.img there are many PKG files, I am unsure ...
2
votes
1answer
826 views

Auto-updating Homebrew

i'm currently using the Homebrew package manager and my question is: is possibile to write a bash's script in order to execute brew update and eventually brew upgrade whenever opening a shell for the ...
1
vote
1answer
102 views

AppleScript to export script editor script as application

I have a binary that I want wrapped up as an Application, so I thought this was a good use case for AppleScript. I want to automate how Script Editor lets you export an AppleScript as a .app bundle. ...
0
votes
0answers
112 views

How to send emails programmatically using scripting bridge if sandboxing is enabled

How to send emails using mail scripting bridge after enabling sandboxing. I am able to send mail before enabling sandboxing but failing after enabling it. As per my understanding, user permission is ...
0
votes
0answers
24 views

Have URL scheme handled by shell (or other) script

I want to create a custom URL scheme, say x-camptown-races-sing-this-song-doo-dah-doo-dah, such that when I open a URL such as x-camptown-races-sing-this-song-doo-dah-doo-dah:foobar, it gets handled ...
1
vote
1answer
78 views

Running a script as root and presenting a GUI to logging in users

I am having a programming decision problem and hope, that you can show me a solution or tell me, if my plan on how to solve the problem would be okay or not. I am managing some macs and want to run ...
0
votes
1answer
42 views

Is there a way to see the automator script in text?

If i create some type of workflow on Automator, can I see the script in plain text? For example, maybe get the script and push it out through Apple Remote Desktop to a remote computer?
0
votes
0answers
319 views

Enable remote management remotely on a mac

I am trying to use remote desktop to send a script to all Macs on my network that creates an additional admin account and hides it. I am trying to do this using Apple Remote Desktop. However most of ...
0
votes
2answers
128 views

Make script run without interrupting GUI experience

I have an AppleScript that automatically opens SelfControl.app to help avoid distractions when I want to be working. The script is very similar to automate an Internet content filter, and it is ...
3
votes
1answer
76 views

Why does this cause Mac OSX to print over SSH?

While screwing around and breaking things I came across these stupid commands (if executed in order it causes what I got): cd / && cat vmlinuz cd /boot/ && cat init* It causes ...
1
vote
0answers
44 views

Copying AFP Path with Automator

I'm updating a Service I created in Automator a few years ago that copies a file path with a certain format in order to be clickable in "Messages". The problem now is that it doesn't work with new ...
0
votes
1answer
417 views

Send Command to Add remote users through ARD

so I'm trying to create an extra admin account on all Macs on the network. There are quite a few so I'm trying to do it through Apple Remote Desktop. Do you guys know how to do this? This is all I ...
0
votes
0answers
41 views

Script to organize photos

I have a bunch of photos in different folders and I would like to organize them into a single directory structure. Many of the photos are duplicated. I would like to organize them into year/month ...
0
votes
2answers
406 views

Add admin account remotely

So I need to add an admin account to multiple macs remotely. All of these macs already have an admin account (so we want to add an additional admin account) and they are bound to AD (worth mentioning ...
0
votes
0answers
123 views

Conditional lsof loop in bash script

I found this example of a conditional lsof loop and want to adapt it to my situation. typeset fSrc="/path/to/sourcedir" typeset fTgt="/path/to/targetdir" while : ; do ls /path/to/sourcedir | ...
2
votes
1answer
84 views

Bash script with lock folder problems for large files

My script is: #!/bin/bash # Path to a lock folder LOCK_PATH="/Volumes/PROOFS_WATCH/copy.lock" trap 'rmdir "$LOCK_PATH"; exit' 1 6 15 if mkdir "$LOCK_PATH"; then echo "Lock file did not ...
1
vote
1answer
246 views

Bash script - Delay cp command until after file write is complete

cp /Folder1/*.mov /Folder2/ cp /Folder1/*.mov /Folder3 rm /Folder1/*.mov This runs every 60 seconds using Chron that copies any *.mov file from one folder to 2 other folders and then removes the ...
0
votes
0answers
18 views

osx automation using spaces

My ultimate goal is to write an automation script that will collect all the open safari windows in a specific space and spit out the URLs. Can spaces be addressed using scripting?
3
votes
1answer
212 views

Running shell scripts in single-user mode

I'm planning on running a couple of scripts in single-user mode to speed up (and simplify for less savvy users than myself) the configuring of a few aspects of some Macs that I set up for other ...
2
votes
0answers
30 views

How can I detect an incoming call on Yosemite

I'd like to detect an incoming Facetime call and run certain scripts as a result. I'd like to achieve something similar to when iTunes pauses when there is an incoming call, but I would run my own ...
0
votes
0answers
13 views

Script iPhone notifications

How can I create notifications on a jailbroken iPhone? I'm hoping for something similar to growlnotify on OS X which lets me send a notification from a shell.
0
votes
0answers
53 views

Convert .docx to .epub with apple pages using command line

Pages has an File > Export To > ePub... option that I'm using to manually convert a Word document (which Pages can open directly) to ePub format. I'm basically looking for the equivalent of: ...
0
votes
1answer
102 views

How to re-span a cron-like launchd script in case of script error?

I have a cron-like launchd script (StartCalendarInterval) that does a backup of some website data once per day: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD ...
0
votes
0answers
26 views

View output from script running in background

While messing around with some Ruby programming (Using OS X 10.9.x), i have constructed a script which is forked to the background, and constitutes a loop which only exits after another process is ...
0
votes
2answers
53 views

OS X - 'Clickable' script to erase files?

I use Latex to write my documents. Latex creates MANY auxiliary files to compile a document. I often times want to clean my working directory. When I was working on Windows, I used to keep a .bat ...
0
votes
1answer
1k views

AppleScript - GUI Scripting and setting checkbox, radio button and field values

I'm working on an GUI scripting AppleScript that will, for the open FileMaker Pro Advanced document, go to the File menu and select the File Options dialog box, then set some checkbox/radio button and ...
0
votes
0answers
90 views

Script - Audio Files - Find, Count and Sort by type

I have a very large audio collection I have to sort. It's a mixture of M4A, FLAC, AIFF, WAV and MP3. It's the result of years of work by a now deceased person who sat in their garage ripping their own ...
0
votes
1answer
284 views

How Can I Convert A .TXT File To A .CSV File Without Losing Any Of The Content Of That Document?

I've been trying for about 4 days now to complete the seemingly simple activity of converting an OS X keychain text dump to a correctly formatted .csv with no progress, much less success. I posted a ...
0
votes
0answers
138 views

Organizing TV Show with automator & tvnamer

Previously I used Hazel (http://www.noodlesoft.com/hazel.php) and tvnamer (https://github.com/dbr/tvnamer/) to sort and rename my TV Shows Collection. I'm trying to simplify the process by using ...
0
votes
0answers
17 views

Silent installer for remote machines

I am trying to create a script to install logmein silently (or in the background) with out enduser input. I have the process to download the zip and create an admin user (for later login) however I ...
1
vote
1answer
101 views

Display dialog with current iTunes album cover

I would like to display with AppleScript a dialog that shows my current title, artist and album. In addiction to that the icon of the dialog should be the album cover of the current album. Is that ...
0
votes
2answers
250 views

Text-to-speech with 2 languages

I am studying French and to practice my pronunciation and to learn the words, I want to have my mac speak the words out loud. My mac should say the word in English, and after that, he should say the ...