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
1answer
1k views

Create Automator Service With a Python Script?

I'm trying to create an Automator Service that will act on selected text, converting dashes to spaces, and also making word caps for all the text. A friend gave me this python script (I know nothing ...
1
vote
1answer
528 views

Set terminal window title in a script

I would like to change the entire title of the terminal window for a particular bash script. I googled out but I couldn't find much more than this suggestion: printf "\e]0;My Custom Title\a" After ...
3
votes
4answers
1k 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 ...
2
votes
3answers
475 views

How can I see how long my computer has been active (as in not idle)

I've seen a variety of solutions to check how long my machine has been idle, and I know I can check how long since last reboot with uptime, but I'm curious if there's a way to see how long since my ...
1
vote
3answers
3k views

Remove Little Snitch via script

I want to be able to uninstall Little Snitch over Apple Remote Desktop. I came across the script below here: http://fromtheadmin.com/kill-and-remove-little-snitch-application-via-ard-script/ However ...
1
vote
2answers
2k views

How do I run an OS X command script on remote Xserves from a desktop OS X script?

The answer to an earlier question, Access and control home office network, iMacs, and Xserves, left me with a new problem. To review, I have a computing environment comprised of: 27" iMac with dual ...
0
votes
2answers
332 views

Is there a dial from Addres Book and tel:/sip: protocol handler script/application available for 10.7?

We are currently using Mac OS X 10.6 and snomURLHandler to convert tel: uri's to a http GET request. This computer telephony integration let us click on a telephone number in Address Book.app and let ...
3
votes
1answer
275 views

Can I make the Finder label a folder if it contains a file or folder of a specific name?

I'd love it if I could somehow make the Finder color-label all folders containing a .git directory so I could tell at a glance if the folder is a Git repo. Any ideas?
3
votes
1answer
333 views

Applescript array of applications

I have a script that reload the active tab of an open browser, but I want it to do with all opened browsers. Is there a way to make a list/array and use it in this code? This code works with one ...
3
votes
1answer
1k views

Fake.app: How to loop thru the rows in a CSV file and use the data in my Workflow?

I am using Fake to automate some web tasks. I have a CSV file on disk that contains rows of data which I'd like to use to fill out forms in my Fake Workflow. How can I iterate thru the rows in the ...
1
vote
1answer
327 views

double password entry to access account

I have the Require password 4 hours after sleep ... option in Security and Privacy System Preferences set and am running a script with launchd to suspend my session at a certain time of day (see this ...
2
votes
2answers
2k views

How can I use Automator to generate a kerberos ticket using KINIT?

I need to be able to generate a kerberos ticket for my MacBook Pro each time the machine restarts. I can manually run KINIT with my credentials to generate a ticket. What is the best way to automate ...
0
votes
2answers
457 views

lock account and sleep

Is there an easy way to lock my mac and then immediately sleep, all in one command? I know I can show the login window and then choose the sleep button, but I'd prefer one step rather than two (and a ...
4
votes
3answers
267 views

App or script to monitor/log processes starting and stopping?

I want to be able to start an app or script, leave it running for a few hours, then come back and see a log of what processes started and stopped in that time. This is not the same as Activity Monitor ...
1
vote
1answer
1k views

Running a gpg shell script to decrypt a file via Automator

I regularly need to decrypt a gpg-encrypted file (always the same) to simply view it in TextEdit. I have a very simple shell script for that. It looks like this: #!/bin/sh outfile=`mktemp -t $$` # ...
2
votes
1answer
541 views

Print folder contents with non-standard printing settings

I want to print all files which are dragged to a folder. Easy to do with Automator. But I want to specify more settings for the print, namely to print the items two times, to use paper tray 2 instead ...
7
votes
4answers
16k views

How do I execute a bash script that requires root privileges?

I have this script lines from my ISP: sudo bash echo "plugin L2TP.ppp">>/etc/ppp/options echo "l2tpnoipsec">>/etc/ppp/options It works if I paste line by line into Terminal. I want to ...
3
votes
1answer
933 views

How do I script Powerpoint to save a directory of PPTX files as PDFs?

If I have a directory of PPTX files I would like to save as PDFs. How do I script this operation?
1
vote
1answer
442 views

An Automator workflow for extracting text as speech from PDF files

I get PDFs to revise course content which I want to convert to MP3 files and take with me as spoken audio. Automator offers 'text to speech' conversion and it's great. When I try and build a workflow ...
3
votes
1answer
477 views

Automator PDF text to Spoken Audio file: What's wrong with this script?

I have pages of PDF notes which I want converted to spoken audio to aid revision. There are several suggested workflows online, but I'm still not getting the results I want. I used this model from ...
8
votes
4answers
4k views

Getting notified when someone logs into a server using SSH or Remote Desktop

I have a mac mini server running OS X Lion Server 10.7.3. It pretty much runs unattended without problems. However, the server is under constant "attack" according to the logs. The firewall and ...
2
votes
1answer
925 views

Is it possible to write a script to change the Energy Saver settings in OS X (10.7.3)?

Basically, whenever I know I'm going to be gone, or if I'm going to sleep, I change the Energy Saver settings in System Preferences in OS X (10.7.3) for Power Adapter to: Computer sleep: 1 min ...
3
votes
3answers
3k views

How can I use Terminal to monitor a network interfaces total traffic in Mb

I would like to use the terminal to monitor the network traffic on a given interface, with a view to providing alerts when certain cumulative totals have been exceeded. The script needs to gain ...
5
votes
2answers
823 views

A programmatic method for disabling all sharing services?

I'm seeking a programmatic method for disabling all the sharing services on a Mac. My preference is for an AppleScript or a shell script. I'd like to have the services shown in the picture below ...
0
votes
1answer
118 views

How can I make a keyboard configuration become default when I hook it up?

At work, I have a MacBook Pro and a RHEL workstation that share a HP keyboard and mouse via a KVM switch. I do most of my work on the Mac so I prefer to change the modifier keys so they command and ...
2
votes
1answer
82 views

'script' command in terminal, looking for a flush open

When I use 'script' on a unix terminal the -f option flushes the data straight to the file - from the man page "-f Flush output after each write. This is nice for telecooperation: One person does ...
1
vote
1answer
1k views

How to make a LaunchAgent with StartCalendarInterval

I want to start replacing crontabs with LaunchAgents. My first attempt is not working. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ...
2
votes
1answer
116 views

Start program in response to system events (like ip address changes, etc.)?

I want to start a program in response to system events, such as: IP address changes WIFI connectivity changes (whether I'm connected, and/or which network I'm connected to) Volume (as in disk) ...
1
vote
2answers
888 views

What is your preferred way to start a (shell) script from the GUI?

I was wondering what ways there are to start a (shell) script from the GUI, e.g. double-clicking an icon in Finder or launching via Spotlight. This is not about opening a terminal and "manually" ...
1
vote
1answer
198 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 ...
2
votes
0answers
642 views

With Lion, Problems Accessing Shared NTFS Folders with SMB://

We are testing a local login script that we created for our Macintosh users on Lion. It has worked fine on all OS X versions prior to 10.7. Listed below is the script that we are using. When we run ...
2
votes
1answer
913 views

How Can I Restart in Windows Using a Script?

I'd like to be able to reboot into the Boot Camp partition without needing to go change the Startup Disk in System Preferences or holding down the Option key at startup. After reading some stuff on ...
19
votes
5answers
10k 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 ...
2
votes
3answers
1k views

Inserting shell script into .app bundle

I'm trying to shoe-horn a shell script into an application bundle so that the shell script will be run when I open the bundle, as opposed to the executable put in there. Specifically, I'm trying to ...
3
votes
2answers
10k views

Can I use my iPhone as a “remote” for my iPad?

iPhones and iPads both have several apps aimed to be remotes for the PC/Mac -- mostly geared towards specific apps. That's not what I'm asking about. I'm interested in any way of using my iPad and ...
6
votes
2answers
459 views

What's the easiest way to automate logging into a website?

There's this website I need to access about every ten minutes. And apparently it was designed in 1993, by sadists. There is no "remember me on this computer" checkbox. And if you don't interact with ...
7
votes
3answers
805 views

Lock screen with LaunchBar

I extensively use Launchbar and have almost all my daily productivity items working through it. Since I use my personal MacBook at work, I do not have use a screen saver password, however, when at ...
4
votes
1answer
596 views

How can I automatically download multiple sites through Coda?

I have several sites in Coda that I would like to automatically re-download when I tell it to. The sites are collaboratively managed, and I'd like to download a fresh copy of the sites automatically. ...
3
votes
3answers
988 views

An app or script to watch folder and display new images in full screen?

I'm teaching a photography class and would like to use a cheap setup to display photos taken by the students in real time. I have a macbook pro and an iphone. I also have an eye-fi card but it's an ...
3
votes
1answer
1k views

What scriptable OCR Software exists on OSX for a paperless office

I'm planning to get a paperless office and for that, I a need good scriptable piece of OCR for OS X? I've read a blogpost by Marco Arment about a few programs. Are there any workable ones there that ...
11
votes
2answers
4k views

What is the difference between .command, .tool, and .sh file extensions?

I saw a couple of questions about executing command line scripts? I saw that the .command and .tool extensions were mentioned. I have always used .sh. What is the difference between these different ...
5
votes
1answer
15k views

How do I remove a user via single user mode in 10.7?

I occasionally will setup a user's machine that has been in for repair beyond the simple re-install of the OS. For example: install a new hd, install the OS, create a user, install updates and then ...
1
vote
2answers
612 views

find video codec from terminal

I'm writing some shell scripts that automatically convert some video files. Except I don't want to run the conversion on files that are already h264 encoded. Is there a way I can tell via a terminal ...
11
votes
2answers
7k 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 ...
2
votes
4answers
2k views

os x terminal -remove files older than x days

trying to create a scripts that deletes files older than X days. It seemed straight forward enough but all files seem to be getting removed? find /Volumes/Groups/Projects/530_BFAMI/test/ -ctime +30 ...
2
votes
1answer
1k views

How to: Create a playlist with full albums for which one (or more) of its contained tracks has a 5 star rating?

I am looking for a tool/script/javascript to run within windows against my iTunes database that will produce a playlist of "all albums for which I have given five stars to any one song." I can easily ...
4
votes
2answers
2k views

How can I enable SSH without using the gui or apple script on snow leopard?

A while back here How can I enable internet sharing without using the gui or apple script on snow leopard? I asked if any one knows how to enable Internet sharing without using GUI or apple script, I ...
5
votes
3answers
2k views

Opening a terminal window to a specific directory from a bash script

How can I write a bash script in Mac OS X that opens a Terminal window in a specific directory? I'd assume something like: open /Applications/Utilities/Terminal.app But that does nothing (maybe ...
1
vote
5answers
446 views

opening an app in a shell script with sudo

I'm trying to open an app that listens to port 25 within a shell script. In order to listen to port 25, I need to run the app with sudo. So I tried the following: sudo open appThatNeedsPort25 It ...
8
votes
1answer
7k views

How do I modify Word 2011 for Mac so I can see tracked changes inline and notes simultaneously?

Background: In Word 2011 for the Mac, it's possible to view tracked changes inline -- that is, see the changes made on the screen within the text itself, as opposed seeing them in a balloon off to ...