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)

6
votes
6answers
3k 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 ...
0
votes
0answers
14 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
1answer
45 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
58 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 ...
0
votes
1answer
38 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 ...
1
vote
0answers
6 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
0answers
16 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
41 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
1answer
1k 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
1answer
1k views

how to use terminal to remove item from dock

Hi I have a shell script in my login item , which runs whenever i log in to my system . It does work completely but once it exits the terminal , it leaves the terminal shortcut on my dock and I don't ...
2
votes
4answers
10k views

How do I create an AppleScript that will quit an application at a specific time and then put the computer to sleep?

I've been toying around with AppleScript and Automator to get this thing to work, but I just can't seem wrap my head around it. If anyone could show me an example or give me some tips on how I can set ...
30
votes
7answers
11k 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?
0
votes
0answers
38 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
52 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
95 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 ...
4
votes
6answers
6k views

How to launch browser in iOS Simulator from command line?

I want to launch the browser in iOS Simulator from the Terminal with specified URL. Is there any command for it? So that I can write in a script which will take URL as argument and launch simulator ...
0
votes
1answer
56 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
12 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
41 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
17 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 ...
24
votes
5answers
18k views

Possible to run scripts on sleep and wake?

MacBook Pro 2010 running OS X Lion. Is it possible to run scripts on sleep and wake events? My specific application is that I've got Dropbox-synced Truecrypt volumes that I regularly use on both my ...
0
votes
0answers
8 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. (Tagged Cydia because I'm hoping ...
0
votes
2answers
151 views

How to print result of some javascript execution in ScriptEditor?

I want to test a piece of a very simple javascript and print out the result. The Script Editor however only prints out undefined in the Result pane. What is the easiest way to print out the result? ...
0
votes
0answers
24 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
52 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
11 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 ...
3
votes
1answer
17k views

Full privileges on .command file, but it says I don't have appropriate privileges

I have a command that I regularly need to run in the Terminal (for application code signing). Normally I launch the Terminal, press the up arrow until I reach the command I want, and then hit enter. ...
0
votes
2answers
37 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
223 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
23 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
0answers
41 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 ...
1
vote
1answer
278 views

How can I regularly move movies in iTunes to an external drive?

I have been adding a lot of movies to iTunes lately. Problem is, the size grows very quickly. I appreciate having the metadata in one place, but I would want to move the actual files to an external ...
12
votes
7answers
12k views

Create a new (.txt) File in Finder - Keyboard Shortcut

I wanted to know if there is way to set keyboard shortcuts to make new files in Finder. For example, by default, you can create a new folder using CMD+Shift+N. Is there a keyboard shortcut to create a ...
0
votes
0answers
12 views

Silent installer for remote macines

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 ...
5
votes
4answers
2k views

My Automator Workflow fails because it fails to find the git command within the 'Run Shell Script' command? Need help

I have an Automator workflow and one of the actions is to clone a repository. Here's the code for the 'Run Shell Script' action. The command is run within the Bash shell /bin/bash if that matters: ...
1
vote
1answer
50 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
1answer
105 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 ...
0
votes
1answer
18 views

Reset dock icons while log off

I have an iMac for public use, I want to ensure the dock icon won't be changed by others (i.e. keep factory setting). Currently I know the following two commands can do this: defaults delete ...
3
votes
1answer
299 views

Script to change Computername/hostname causing bizarre Terminal behavior

I have a script (mostly borrowed) which utilizes scutil to rename computers based off of values in a CSV file. It matches the serial number to a computer name, sets a variable, and then renames the ...
0
votes
0answers
34 views

How to create two column table script?

Is there a way to create a two column table in TextEdit with some way to create new cells by hitting the Return key, as you can do in Word? Alternatively, is there a way to achieve the same effect ...
1
vote
3answers
173 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 ...
1
vote
1answer
39 views

Is there a way to see the invisible formatting in my clipboard and/or create the formatting when piping to pbcopy?

Is there a way to see the contents of my clipboard in a way that shows me what formatting metadata is included? Or to get to the question behind the question: is there a way to generate output in a ...
0
votes
3answers
246 views

Login Script for deleting contents of /private/var/folders

We have fleets of laptops that have limited space once our software is installed on it. What ever the issue that is causing the creation of theses files and --err not flushing them, we are ignoring ...
-2
votes
2answers
45 views

How do I make this terminal script work properly?

I want it to appear like I'm contacting a bunch of ip-adresses and it works fine until the third line in the code and I want to be able to fix it. Also the 4 bottom lines don't work. So this is ...
0
votes
1answer
25 views

Using Fluid.app is there a way to switch tabs periodically?

I'm using Fluid.app as a way to display content from URL for monitoring my servers and other services in my data center. I have a few tabs open in this fluid.app window to display another URL with ...
4
votes
4answers
18k 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 ...
2
votes
3answers
591 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 ...
5
votes
5answers
4k views

Alternatives to command line unzip?

I've found that the command line unzip tool doesn't gracefully handle some of the files I'm unzipping: it makes a bunch of junk directories, and creates files whose resource forks aren't found. ...
0
votes
1answer
41 views

How to Change Scroll Speed Programmatically with Applescript or Shell Script

Is there a way, using either applescript or a shell script, to change the scroll speed? I don't even know where to begin to look for a mechanism for this. Oh, and no third-party applications either, ...
4
votes
1answer
113 views

What are the differences between Applescripts saved as *.scpt and *.applescript?

It seems to me that those scripts that are saved as *.applescript are always meant to be the raw, uncompiled text while those that are saved as *.scpt can be either the raw text or the compiled ...