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. ...
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?
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
50 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 ...
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 ...
1
vote
1answer
69 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 ...
1
vote
0answers
72 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 ...
0
votes
0answers
22 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
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 ...
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 ...
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
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 ...
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
38 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 ...
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 ...
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 ...
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
235 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
76 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
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
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?
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 ...
1
vote
1answer
363 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
54 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
68 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
19 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
49 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
37 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
193 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
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 ...
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 ...
1
vote
0answers
37 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
233 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
30 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
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 ...
0
votes
0answers
85 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
73 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
177 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
17 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
125 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
29 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 ...