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)

1
vote
1answer
20 views

Packet sending script, iOS 9.1

I have an app which sends specific packets to a server every time I press a particular button on the app, the problem is that I need to press it every 30 seconds during a few hours and it's annoying. ...
1
vote
1answer
1k views

How do I create a script to create/modify local admin accounts?

This question is almost exactly what I need for my project at work. We have approx. 400 Macs on our campus, and the problem is they were not all set up identically. There are at least 4 different ...
0
votes
2answers
129 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 ...
1
vote
2answers
48 views

Scripted SFTP command line file transfer Mac OS X

I'm working with someone who's been doing simulations on various computers and FTPing the results to a website using a script and the basic mac ftp command basically something like (this is not exact ...
0
votes
1answer
8 views

How to trigger a bash script from right click in Safari on a particular URL?

is it possible when I'm in Safari and have link (URL) to trigger a bach script with an right mouse option? The bach script should be run with this format: bash scriptname.sh -parameter -parameter ...
0
votes
0answers
6 views

Duplicate calendar events in Outlook 2011

Does someone have a script to merge or delete Outlook 2011 duplicate calendar entries?
2
votes
2answers
2k views

Double click in AppleScript

How do you write the command to carry out a double click with a mouse at a specific location in AppleScript?
0
votes
0answers
9 views

Install App Store Application via Script [duplicate]

I'm working on automating my OSX setup further and I was curious if anyone knows how to install application via a script from the app store. I've seen examples before but it involved opening safari ...
1
vote
2answers
3k views

Setting a firmware password

Currently trying to use a script (preferably shell) to setup the firmware password on a fresh OSX install. I obviously found this: http://osxdaily.com/2014/01/06/set-firmware-password-mac/ which ...
1
vote
2answers
27 views

How to hide Terminal Window when a script is running

I've built a script that sits in the users login items that runs each time a user logs in but I want to prevent the terminal window or terminal application from popping up. I don't mind the app icon ...
3
votes
1answer
73 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 ...
2
votes
1answer
357 views

How to have Finder open 'Pictures' folder when iPhone connects and photos import via AutoImporter.app?

I have a nifty setup on my MacBook Pro, where, upon connecting my iPhone, I have AutoImporter.app (/System/Library/Image Capture/Support/Application/AutoImporter.app) automatically import whatever ...
5
votes
5answers
26k views

Way to logout a user from the command line in OS X 10.9

I want to logout my Mac OS X from the command line. My OS X version is 10.9. I tried command pkill -KILL -u uid, but this command didn't work out. Is there a command that can be used to log out a user ...
1
vote
1answer
66 views

Passing arguments to 'Run Shell Script' in Automator

I want to make an Automator workflow to run a shell command. For example, I want to receive text input from the user and treat that input as a shell command instead of text. If has tried pass argument ...
4
votes
1answer
57 views

Extracting latency value from output of ping

I am trying to pull a latency value from a ping with the following command: ping -c 1 206.190.36.45 | awk -F" |=" '/time/{print $10"ms YH"}' But I want to remove the digits after the . So instead ...
8
votes
4answers
12k views

Are there Greasemonkey scripts for Safari?

There's the wonderful Greasemonkey to run user-defined JavaScript on web pages. Is there such a thing as Greasemonkey for Safari? Or would one instead write a Safari Extension to customize behavior ...
2
votes
0answers
89 views

How to access GPS data from command line on jailbroken iPhone

Are there any binaries available via the command line to get information from the GPS on a jail broken iPhone? I've searched through Cydia and haven't found anything, but I wouldn't imagine this ...
0
votes
0answers
12 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.
1
vote
1answer
361 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 ...
0
votes
3answers
11 views

Retrieving the “Version” attribute of an OSX Application file via Bash

I was initially attempting to do this in Java using the UserDefinedFileAttributeView class but it turns out that is only available on Windows computers (This is being run on OSX) So I switched gears ...
1
vote
0answers
71 views

AppleScript to automatically update IP-adress in Remote Desktop (ARD) on computers with DDNS

I've been searching for hours but couldn't find an answer yet hence my question here. I frequently use Apple Remote Desktop (ARD) and I have setup a DDNS for every computer. The only problem I have ...
0
votes
0answers
34 views

Disable iTunes using a Script?

There's a much despised bug in OS X wherein iTunes unexpectedly opens and in some cases, starts playing music, a podcast, or whatever the user was listening to last. The bug can be triggered in a ...
2
votes
2answers
507 views

Change iTerm2 Default profile preset with “defaults write…”

I want to do this in my dotfiles script. I managed to download the preset I want using curl and open it, but I don't know how to set it in the default profile: curl -L ...
0
votes
0answers
21 views

Execute macros or scripts based on Magic Trackpad 2 Force Touch

I’m looking at getting a Magic Trackpad 2 with Force Touch, but want to know if I can create macros for the Force Touch actions? I’m not taking about the the built in basic Apple support, but full on ...
0
votes
2answers
192 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 ...
2
votes
1answer
75 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 ...
1
vote
1answer
27 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
2answers
63 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 ...
6
votes
4answers
405 views

Tools or scripts for tracking a stolen or lost Mac?

Actually I do use the prey project but was wondering about other tools or scripts one could use to find back information about a lost/stolen Mac. With features like: -Getting the ip address or any ...
12
votes
3answers
11k views

Make a script/app run on logout

We all know that Mac OS X has the very useful Login Items functionality which lets you, among other things, set up apps/scripts to run when you log in. I'm looking for a way to setup a list of ...
0
votes
0answers
13 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 ...
3
votes
3answers
725 views

How to check installed OS X version from the command-line on each partition?

I'm managing a lot of Macs and each machines has several partitions with different OS versions. I would like to create a script that I could run to do an inventory of all partitions of all machines ...
1
vote
1answer
89 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
50 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
37 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
26 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
21 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
26 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 ...
0
votes
2answers
101 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 ...
0
votes
1answer
18 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 ...
2
votes
1answer
21 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 ...
1
vote
2answers
38 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
18 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
234 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
81 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
4answers
527 views

Built-in GUI-based ASCII only editor for OS X

I am trying to programmatically invoke an OS X editor from a script which: does not add smart quotes or any non-ascii characters while editing will work "out of the box" on any standard mac system ...
4
votes
1answer
70 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 ...
8
votes
6answers
4k views

Toggle “Use all F1, F2 as standard keys” via script

I toggle the "Use all F1, F2 as standard keys" setting very often and would like to automate it via a script (or a keyboard shortcut). Is it possible? I've tried to Google the right arguments for ...
1
vote
0answers
52 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
45 views

Detect mouse move or keystroke

Is it possible to make a program execute when the mouse is moved or any key is pressed?