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
2answers
1k views

How to Run Shell Script upon Application Launch?

Not sure if this belongs here or on SuperUser, but it's Mac specific, so I'll go with here. I wrote a Ruby script that edits TextMate's global properties file and changes the theme based on the time ...
2
votes
3answers
1k views

How to determine the absolute path to a file in a shell script

I am writing a generic script that can get passed both absolute and relative (to the current working dir) paths to existing files. I need a fail-safe way to turn all those passed paths into absolute ...
1
vote
2answers
314 views

How can Growl trigger an shell script or AppleScript (NOT vice versa!)

When a Growl notification gets issued I want to trigger an AppleScript. I had a look at the "Actions" in the Growl preferences, and you can trigger things like an email or a text-to-speech call, but ...
2
votes
2answers
424 views

Using cURL to download images in XML feed?

I have an XML file that has links to various .jpg I want to create an applescript that downloads a local copy of these. The idea is to also label them sequentially with a number say 001 to 030. ...
4
votes
1answer
2k views

How to batch convert word documents to pdf?

Is there a scriptable way that I can convert several MS Word documents to PDF? I thought this might be possible using python, but I am unable to find any advice online on how best to do this.
2
votes
1answer
58 views

Sharing settings report (security audit)

I am new to Mac administration and struggling somewhat on how to programatically report in the settings in the Sharing Preference panel (10.7 and 10.8). Basically - I want to report in which settings ...
4
votes
5answers
6k views

Can I download all pictures on a page?

Is there a way I can run a script with a certain web page as the argument that will download all the images from there?
1
vote
0answers
363 views

How can I create (nested) Keynote.app slides from a XML file?

I have some nested lists (XML/OPML file) and I am looking for a (automated) process to create Keynote presentations from them. Use case: I write concepts for presentations in an Outliner, then would ...
1
vote
2answers
130 views

Monitor Console.app for a string and notify when found

Is it possible to monitor all messages in Console.app for a string and then notify the user when this string occurs? I have the problem that I'm getting disk I/O errors and I suspect that it's not a ...
0
votes
2answers
368 views

Applescript to update year tag for audio files

I have a lot of tracks in iTunes where the files are named "music-NNNN.mp3" with NNNN being the year the track was recorded. How can I use Applescript to automatically set the year tag for these files ...
3
votes
1answer
145 views

Detecting that a script is run within ARD

Does anyone know of a way to detect that a shell script is running within ARD (vs. running the same script locally on the machine)? I looked at detecting that we are running in interactive mode - ...
3
votes
1answer
477 views

Batch update the birthdays in my iPhone contacts

Years ago when I got my first iPhone, AT&T transferred all of the contacts from my old phone. My old phone didn't have a birthday field in the contacts. Instead of leaving the field empty on the ...
2
votes
1answer
2k views

How can I open Google Chrome in Presentation mode using a shell script

Previously in 10.6.8, I was able to start Google using open /Applications/Chrome.app --args --kiosk http://www.google.com Now, on newer systems, that does not work anymore correctly. The only way to ...
0
votes
1answer
102 views

Organizing skype downloads in subfolders with contact names

I always wondered why skype don't put all my accepted downloads in subfolders with the name of my contacts! If anybody have own solutions, share)
8
votes
2answers
4k views

Is there a Mac OSX equivalent of zenity?

I'm porting some simple X windows/bash scripts to Mac OSX, but I cannot find a build of Zenity (a Gnome app for basic GUI dialogs) for OSX. Is there some other command line driven dialog utility I can ...
2
votes
1answer
180 views

Running actions when I disconnect external monitor

I would love to auto start Bartender (by the way, excellent app that hides some of your notification area icons) when I unplug my external monitor from my Mac. Is there any app or script that could ...
1
vote
2answers
2k views

Display dialog from command line (like xmessage does)

Background I'd like to be able to display a notification window in OS X from within a script. The script will be running in background, so the notification should not go to the terminal but instead ...
1
vote
1answer
426 views

How to detect from a script that a TimeMachine backup is running? [duplicate]

Possible Duplicate: Is there a bash command to check to see if Time Machine has finished backing up? To run some syncs to remote servers to have their data included in TimeMachine backups I ...
2
votes
2answers
323 views

“sed” or “awk” launched on opening terminal window

At some point, I've noticed strange behavior of Terminal app - now on opening new window i get this as normal: Last login: Tue Nov 27 11:54:21 on ttys001 but can't see the "~" sign afterwards and ...
0
votes
1answer
476 views

Can't find/run `configure` script on mac os 10.8

I'm trying to install a program called CSIM (neural micro circuit simulator) and one of the steps is as follows: Step 2. Run: configure; make; for Linux/Unix(/Mac OS) But I can't run, not ...
0
votes
1answer
359 views

Programmatically read both per-tab Terminal.app titles

When bringing up the Inspector (⌘I) in Terminal.app to edit the title (⇧⌘I), there are actually two titles that can be entered. The first is known as the Tab Title and affects the terminal window ...
0
votes
1answer
176 views

Script to Update/download most recent iTunes podcast WITHOUT opening iTunes at all?

I have a couple favorite podcasts that I subscribe to in iTunes. I'm using You Control (so I don't have to open iTunes to play my music). I'm using Keyboard Maestro. I've made a macro that runs ...
0
votes
1answer
2k views

How to initiate a specific keystroke using automator?

I have the following code : on run {input, parameters} if application "KeyboardViewer" is running then quit application "KeyboardViewer" else activate application ...
3
votes
3answers
164 views

An automated iTunes?

So I've wanted this for a really long time but I'm not 100% sure how to do it. I basically want to be able to have iTunes play a radio station when I come home. I was thinking of being able to have ...
0
votes
1answer
3k views

executing shell script requiring input from the user using the Automator

Using the automator is possible to execute a shell script that requires input from the user (a password) ? The shell script should be executed in the currently selected folder. I wrote a "Run Shell ...
0
votes
0answers
2k views

OS X 10.8 'cannot execute binary file'

I have a third-party software to preprocess my data (the data is recorded with the device of the third-party). This software was written for unix systems and runs without any problems on the following ...
0
votes
1answer
2k views

View youtube videos in 720p by default in Safari?

Is there a way I can force safari to start youtube videos at 720p by default ?? I was wondering if there is an automator code that can achieve this ? Or maybe an extension that solely does that ? (I ...
0
votes
1answer
7k views

How to lock MacBook with a keyboard shortcut? [duplicate]

Possible Duplicate: Is there a quick way to lock my Mac? I am familiar with using Automator, but I do not know what code should be used to accomplish the feature. Can anyone provide the ...
1
vote
1answer
303 views

how to create daily task for GMVault in automator

I just moved to Apple, being an experienced (i'd like to think so) Windows user. Recently I started using GMvault (gmvault.org) to backup my Gmail account locally, but it's become a pain having to ...
1
vote
1answer
149 views

logger vs syslog -s

What exactly is the difference between using logger and syslog -s? According to its manpage, logger provides interface to the system log module, but I can't really see the point given that syslog(1) ...
1
vote
1answer
787 views

“Self Destruct” script to remove certain directories and/or applications

Let's say your work situation isn't going so well, and you suspect the end is near. How would you prepare a script (or similar) to remove your personal files and applications from your work computer ...
0
votes
1answer
355 views

Is it possible to trigger a script when drive is ejected from the Finder?

I'd like to run a script (removing non-OSX .* files) on a USB drive whenever that drive is ejected - is there a way to trigger a script automatically when a drive is ejected from the Finder? To ...
0
votes
0answers
70 views

Is there a simple way for daemons and agents to communicate?

I've got a daemon that periodically checks for, and if applicable updates, some software (macports) and I'd like the user to get a GUI indication, using terminal-notifier, when that occurs. Since ...
1
vote
0answers
176 views

How can I make an Apple script for iCal event?

I'm trying to find a script to create a specefic type of event with iCal. Actions that I'm looking for in the script are: Create an event Choose a time and date Choose an alarm Choose a specific ...
2
votes
3answers
5k 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 ...
6
votes
3answers
2k views

How to disable individual USB ports by script?

I am looking for a script which will allow me to disable one specific USB port on my Mac mini. It would only serve a purpose if it works in real-time and didn't require a reboot. I've found scripts ...
0
votes
1answer
2k 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
580 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 ...
4
votes
5answers
2k 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 ...
3
votes
3answers
530 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
410 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
303 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?
4
votes
1answer
397 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 ...
4
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
362 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
461 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
276 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 ...