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
532 views

How can I import a .terminal file using the command line?

I'm writing a (Bash) script to automate setting up my Mac environment and would like to do this, except using the command line only. I'd also like to make that theme the default. I have a .terminal ...
0
votes
2answers
34 views

Determine the location of a shared folder in Win7

I am now using Mac OS 10.8, and want to write a script (.sh) to copy some files from Mac to the shared folder of a Win7 computer. I can access the Win7 computer shared folder via Finder, but I do not ...
0
votes
1answer
1k views

Automator won't execute my bash shell script

I have a bash script that works like a thread. Now I'd like to turn it into a service with Automator. Input is set to Image Files in Automator and the shell script action is set to Pass input as ...
0
votes
1answer
124 views

Simple Script for URI Handling

Basically what I'd like to know is how can I setup a shell script (or an Applescript or Automator wrapper for a shell script) as a protocol handler for a custom URI (so clicking them will trigger my ...
1
vote
1answer
38 views

Can two apps be tied so that when one opens or closes, the other does so?

Can triggers be set up so that when "App A" starts, another "App B" gets started automatically? Ideally, the solution would send a quit message to "App B" when "App A" quits, but the important part is ...
1
vote
1answer
294 views

Automator to execute shell script with an input text file, copy it to specific directory

I'm simplifying making a .deb file with Automator. I currently have a shell script that does some simple actions - Ask the user for text input Do some directory parsing Execute a command with the ...
2
votes
2answers
782 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: ...
0
votes
0answers
14 views

How do I use Mathias .osx defaults? [duplicate]

I just got a mac and am still familiarizing myself with it. I was taking a look at: https://github.com/mathiasbynens/dotfiles/blob/master/.osx Not sure how to use it!
1
vote
1answer
122 views

Export or list system settings that deviate from defaults

I am looking to generate something similar to this osx settings script. I'm not having any luck finding ways to perform a diff between system defaults and my customized settings. Anyone know of a ...
2
votes
1answer
277 views

How do I use say command creatively to prank my coworkers/friends?

I'm designing a creative / funny prank for OSX via command line. By running in the background, most users would not notice it when she/he first starts using the computer. Using say command with ...
1
vote
1answer
218 views

Automator Service with Google Translate

I set up an Automator Service that receives selected text and then runs a simple shell script to pass the text to open google translate: open https://translate.google.com/#auto/en/"$@" It opens ...
1
vote
2answers
92 views

Is there a user-friendly app that can create an archive of system.log files and the like?

Background I have this command to create a temporary collection of selected log files – sudo tar -czf $TMPDIR/archive\ of\ install.log\ and\ system.log\ files\ only.tgz ...
0
votes
1answer
1k views

Terminal bash commands stopped working

I was trying to install some stuff for scala development on my MAC, and probably I managed broke the shell/terminal while I was mindlessly running some scripts that I don't know. Now when I start the ...
2
votes
1answer
105 views

extract to a new folder with spl name

working on OS X 10.8.3, have part of what I want working, hoping for help with the rest #!/bin/bash # script accepts a path to base dir - base path to extract # also accepts second param - archive ...
-2
votes
1answer
2k views

How to configure Automator to log into a website, each time generating a new random UID and email address?

I need to find a way to log into a company intranet site multiple times in quick succession on OS X 10.8.2, each time with a new completely random user ID and email address. The website only requires ...
1
vote
2answers
593 views

Scripting on iPad - accessing features like accelerometer, GPS, etc

Are there any scripting languages for the iPad that can access native functionality like accelerometer, GPS, text messages, etc? I know that it is possible to write Scheme and Python scripts but I ...
1
vote
1answer
353 views

How to create an apple script that forwards a flagged email

I want to create an apple script that will forward a flagged email to x@mail.asana.com I have tried this script: on run tell application "Mail" repeat with _acct in imap accounts ...
0
votes
1answer
62 views

Show When Applications Were Opened and Closed

I'd like to be able to see a list of applications that were recently opened and quitted on a per user basis. Ex: 19:25:34 Google Chrome Canary opened by John Smith 20:45:32 Pages quitted by Julie ...
1
vote
2answers
265 views

Need Help with an Applescript / plist

This has been a learning experience for me. Everything checks out logically to me in this script/ plist but something isn't correct. Everything runs, but then the script runs every minute which is ...
0
votes
1answer
37 views

Is it possible to show custom icons in the Scripts menu?

You know that "scripts" menu you can show in the right side of the menu bar? It's very useful. I'm talking about this menu: I've set some custom icons for the files in the scripts folder using the ...
1
vote
1answer
367 views

Run script on networked user login

The computer lab is running 10.8. I would like to run a script when networked users login. As far as I can tell my choices are: launchd agents - Not meant for this. On the launchd.plist man page it ...
1
vote
3answers
1k views

Find/Unrar/Delete Script

I'm a PC convert, and quite novice when it comes to shell/bash scripting, but I really want to learn/understand more. My need: I need to be able to scan a folder, find any .rar files, extract the ...
2
votes
0answers
168 views

Can I use the Terminal to find all OpenMeta tags on my system?

I know that there are apps that can do this, so I figure it must be possible: I'd like to compile a list of every OpenMeta tag that I've used on my Mac (OS X 10.8.3). But here's the rub: I'd ideally ...
2
votes
1answer
84 views

How to implement this script on a Mac

I just read Matt Might's blog post on eliminating filler and "weasels" from my writing, and I am wondering how I would implement this on Latex to run and check my document? I know I should use ...
1
vote
2answers
118 views

Is there such an app or script that automatically logs off a user after a given number of minutes of activity?

I am looking for information on either an app or script that logs off an account after a certain number of minutes. I know this can be done by default after X amount of inactivity. However, I am using ...
0
votes
1answer
139 views

File path to file on Mac Mini via LAN

I have a bunch of data files on a Mac Mini that I want to read over my wireless LAN in a script (F#, not that it matters I think). I can see the files in Finder, but don't know how to read them in a ...
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 ...
0
votes
1answer
275 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
369 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
1k 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
57 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
5k 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
320 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
126 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
306 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
135 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
415 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
92 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
3k 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
166 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
1k 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
401 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
285 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
406 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
310 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
167 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
148 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 ...