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
3answers
37 views

Easiest way to get path of currently-opened file in Adobe Acrobat?

When viewing a file in Adobe Acrobat Pro XI on OSX Yosemite, I sometimes want to send the file to another application. To create an action in KeyboardMaestro, I need to get the path of the ...
0
votes
1answer
13 views

Duplicate calendar events in Outlook 2011

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

Live Photos Metadata

I've been trying to transition from Apple Photos to a plain folder tree (and then use dropbox). For this to be useful, one needs a good naming scheme. I did a bit of googling and using Hazel seems ...
10
votes
6answers
5k 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
votes
1answer
12 views

Backing up data

I have a script that used to run daily that looked like the following to backup my mac. Backup script pastebin As you see here, this script is TERRIBLE because it deletes everything in the folder ...
1
vote
2answers
2k views

AppleScript To Manipulate VLC

I want to do a script, that it can launch VLC player, and in VLC player "Open a file", then "Select a folder", then click on "add" then "play" it. I think that Automator can't do this. But ...
1
vote
3answers
77 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: ...
0
votes
1answer
13 views

How create an identical timestamp format as used in ppp.log file in a shell script?

In the need to add custom logging messages to ppp.log, I see that the date and time are missing when outputting the command to >> /var/log/ppp.log. Other pppd related messages in ppp.log are ...
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 ...
0
votes
0answers
27 views

AppleScript Remove Safari Cache but keep cookie and history

I want to get rid of Safari cache and website data but keep cookies and history. The script will be added to my computer startup script for optimizing the system performance. I was considering this ...
0
votes
1answer
26 views

Is there a `watch` command native to Darwin/OS X?

I have a script that I'm trying to port from Linux to Darwin/OS X. The Linux version currently depends on the watch command, which doesn't appear to be installed on Darwin/OS X by default. What's the ...
0
votes
1answer
21 views

Clean shutdown/restart from terminal in 10.7+

I have a headless system that is controlled remotely that I need to shutdown/restart in an automated way (without the use of VNC or local keyboard/mouse). Using various commands via SSH or via my ...
3
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?
3
votes
1answer
37 views

Need my automator script to display the regular shutdown prompt before shutting down

I'm using the script below to trigger a shutdown but I would like it to give me the normal warning menu with the 60 sec. countdown, I can't figure out the warning menu. tell application "finder" to ...
0
votes
1answer
61 views

How to create an Automator service to run a script on all files in a folder

I want to create a service using Automator to run a shell script on all files in a folder, say delete all log files. What I have done is Created a new service in automator. Added a "Run Shell ...
3
votes
1answer
104 views

Problems reconnecting to WiFi if connection is lost

In the area where I live there are frequent power outages for a few seconds. I am connected via a router, which (of course) restarts each time. Unfortunately my Mac (2011 MB Pro) does not ...
0
votes
2answers
52 views

How to write a script that runs whenever a new file is added to a specific directory?

I've never written a script for OS X, and I don't really know which scripting tool i'll use for this task. Here's a pseudo code for the script I want to build : whenever a new file X is added to ...
1
vote
2answers
38 views

Problem with scripted account deletion syntax

I'm working on an account cleanup script module that can handle the hidden and unhidden accounts we're creating in bulk on new MacOS systems. We've kept the logic simple to start. However I keep ...
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
1answer
33 views

Dtrace script newproc.d stopped working after upgrade, because of missing proc:::exec-success probe

I'm trying to run: $ sudo /usr/bin/newproc.d which suppose to snoop new processes as they are executed, but it fails with the error: dtrace: failed to compile script /usr/bin/newproc.d: line ...
0
votes
0answers
15 views

Can a script-based Service be used to invoke speech output of selected text using VoiceOver?

The usual text-to-speech feature doesn't work with the user-customized pronunciation from the VoiceOver settings. Could this shortcoming be worked around using a script and Service via Automator?
5
votes
6answers
30k 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
0answers
25 views

Error in dtrace script that print process cmdline + parent name.

I'd like to have dtrace script that for every new process, print it's commandline + it's parent process name. here's my script : #!/usr/sbin/dtrace -s proc:::exec { self->pexecname = ...
4
votes
1answer
80 views

How to create a service that puts selected text into quotation marks?

I'd like to create a service that puts any text I select in TextEdit or web page text editors into quotation marks. I understand Automator is the tool to use, but how do I create this action using ...
1
vote
1answer
22 views

osascript dialog box is blocking.

I'm using osascript to display dialog box from bash script, but it's blocking the script, until i press the 'ok' button. I wonder if there's a way to make this display window asynchronous. osascript ...
1
vote
1answer
31 views

AppleScript: Display alert or restart when application terminates/crashes?

I rely on Dropbox for syncing work files between two computes that are powered on 24/7. For some reason, Dropbox terminates (crashes or quits) after long periods of time, with no explanation. I just ...
1
vote
1answer
50 views

OSX - Button spam help?

I want to be able to spam the jump button without having to hit the space bar multiple times, and I have a line of code but I'm not too sure what it is doing. tell application "System Events" ...
35
votes
7answers
14k views

How can I change a file or folder icon using the Terminal

How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
1
vote
0answers
17 views

Mass Change Security to Mac App only option

looking to see if others have created a successful way in using ARD to deploy a script to change the security settings from Mac App & Identified developers to Mac App store only. OSX - 10.9.5 ...
0
votes
1answer
22 views

Executing executable file by means of script file

For executing file in linux terminal we run something like this: ./sflm -start Now, if i want this procedure is done by executing a script file what should i do ? I want to for example run this ...
4
votes
1answer
57 views

Change font of Terminal programmatically w/o restarting

At home I've got a nice big display that unfortunately does not have the same resolution as my retina macbook does. I'd like to use a pixel-font on the low-res screen and a nice smooth one on the ...
1
vote
3answers
4k views

Problem with startup script rc.local in OS X 10.10 Yosemite (Running Bootcamp in VirtualBox)

Until OS X 10.9 I could also run bootcamp within Virtualbox (through a .vmdk file). In order to do this I needed to unmount the bootcamp partition after changing the permissions during the OS X ...
0
votes
0answers
42 views

Run Script at Shutdown

Is no way to run a shell script immediately before system is switched off? What I found via google was just to use rc.local.shutdown or so, but it seems that this function was kicked out on previous ...
8
votes
5answers
17k views

How to persistently define aliases in Terminal

I want to add aliases to my environment so that they are available in all Terminal instances. I got this answer: Yes, you can put it in your .bashrc, .bash_profile or .profile. On some systems ...
0
votes
0answers
32 views

OSX handling of USB Drives and Permissions - need clarification/explanation

I'm new to the site, and well, new to MACs. I have an image (dual boot yosemite and win7) on some old iMACs, late 2009s. When I deploy this image, sometimes my bootmenu disappears and I have to ...
1
vote
1answer
58 views

What is the crlcache keychain and why do I have so many of them?

I run the keychain command-line app that allows me to fast-sleep my Mac or quickly lock a keychain. However, it seems to think that I have many crlcache keychains: When I search for crlcache on my ...
1
vote
1answer
54 views

Setting anacron on Mac - Shell Scripting

I set cron to run script every day using env EDITOR=nano crontab -e where I wrote something like this @daily path/to/sript.script. Now I want to use anacron to be sure that script is going to be run ...
1
vote
1answer
22 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
2answers
311 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
122 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
22 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 ...
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
50 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
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 ...
2
votes
1answer
373 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 ...
1
vote
1answer
237 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
82 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 ...
9
votes
4answers
13k 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 ...
3
votes
0answers
108 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 ...