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)

2
votes
3answers
264 views

Running a bunch of commands in Terminal

I run the following commands for logkext a lot in my terminal and would like a know a way to automate the whole process. Open terminal type "sudo logKextClient" Type in administrator password ...
2
votes
2answers
301 views

Does Mac OS X's bash read scripts for all users (tab-completion scripts) from /opt/local/etc/bash_completion.d path?

I stumbled upon some instructions in the book "Pro Git" It suggests: Download this file : https://github.com/git/git/blob/master/contrib/completion/git-completion.bash If you use the Bash ...
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 ...
1
vote
1answer
30 views

AppleScript to find and delete a folder inside an FCPX library

I need to write or find a simple script to find, select and move to trash, folders within a Final Cut Pro X library. Because these libraries are bundles you can't search them in the normal way. What ...
1
vote
1answer
73 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?
1
vote
1answer
372 views

need to script connection to telnet and send commands to remote device with no user input

Ok I need some help making a script that will connect to a server and send 2 commands Ideally I would have telnet 192.168.2.230 9993 and once it logs in (no user name or password required - the ...
1
vote
1answer
89 views

Bash script to run command with prompt for input

How can I create a script using the following command? mmap -sn -n x.x.x.x/8, /16, /24 and so on. I would like the script to run the command when I type in "sweep" and then prompt me for the subnet ...
1
vote
1answer
36 views

Delete folder with specific condition

I need a script to delete a folder, only if the folder does not contain media files with extension avi or mp4.
1
vote
1answer
21 views

Where are the actions stored that the Contacts.app can apply on telephone numbers?

When I click on a telephone number in Contacts.app (or more precise: on the word left of it) I get to see the following menu: Where does Contact.app store these actions? I couldn't find anything in ...
1
vote
1answer
161 views

Unable to create a working .app executable using Platypus

I'm new to OS X and I'm trying to create an application wrapper for a shell script that starts a media server(Red5) I'm trying to wrap the Red5 server starter script (red5.sh) into an .app executable ...
1
vote
1answer
326 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 ...
1
vote
1answer
277 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 ...
0
votes
1answer
117 views

Script / Automator for conversion of Apple Works docs to .odt docs

With about 2500 AppleWorks docs, dating back to 1995, which I cannot open in the newly purchased Apple Pages ( but with LibreOffice), I need a script or some other automation to do it. (Most of the AW ...
0
votes
1answer
99 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 ...
0
votes
1answer
39 views

How to script a logout while screen is locked?

I want to log out a user via a shell script, after a delay. However, there's a few other issues: User does not have admin and/or root. Logout must complete even if screen is locked. Currently, I'm ...
0
votes
1answer
234 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
24 views

Change Modifier Key While Application is frontmost

What I'm trying to accomplish is to intercept or change Command and replace it with Control for use while another application is running and frontmost. Is there a way to temporarily change modifier ...
0
votes
1answer
96 views

SIPS: Only Resize if Image is 315x300?

I'm currently using sips --resampleHeightWidth 250 300 "S1" to resize new images in a folder but I think that it might be resizing images that were already resized.. Is there anyway to know this for ...
0
votes
1answer
361 views

Start screensaver/ lock screen on screen sharing disconnect

Is there a way with an AppleScript or shell script to start the screensaver when you disconnect from a screen sharing session? For example, I connect via screen sharing from Mac A to Mac B. When I ...
0
votes
1answer
268 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 ...
0
votes
1answer
295 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
264 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 ...
-1
votes
1answer
36 views

Seeking shell-scripting resources for the visual learner

I'm trying to teach myself shell scripting. I understand things best when I see them in the context of a system, especially when I can visualize that system. I'm looking for a visual companion to ...
2
votes
0answers
22 views

Run script when I connect something to the line in port?

I'm connecting my phone to my mac via the line in port to listen to podcasts. I'm using the app LineIn to do this and I was wondering whether there was anyway I could have: My audio input be set to ...
2
votes
0answers
35 views

How can I tell programmatically whether a process is in app-nap?

I'm looking for a script, built-in shell command, or program (with sources) that can tell me whether a process is in App-nap mode or not. I want to use it in automated testing, for profiling and to ...
2
votes
0answers
179 views

How to run a shell script upon user authentication (e.g. screen unlock)?

I would like to specify a shell script (say one to send me an email) whenever a given user is authenticated, for example if prompted after sleep, fresh login or fast user switching. PS: I found ...
2
votes
0answers
162 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
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 ...
1
vote
0answers
30 views

Exponential Slowdown of Applescript

So I've been working on a simple AppleScript to try to help with managing my e-mail in OS X's Mail, and I have it seemingly working just fine with one major problem; the performance of the script is ...
1
vote
0answers
21 views

Logs for checking establishment and disconnect of mac user remotely

I am using Vine VNC Server in Mac OS X for accessing my desktop remotely. I want to fire two scripts: One at establishment of the VNC connection One at disconnection of the VNC connection I ...
1
vote
0answers
55 views

Correct Way to Check if Spotlight Has Indexed a Folder's Contents

Okay, so I've written a script that uses mdfind to more quickly match files, however, I need to find the best way to check whether a target directory is indexed or not, so I can fall back to using ...
1
vote
0answers
40 views

How to change audio output according to display state?

I've got a Mac Mini connected to a TV via HDMI. I would like to have the audio output device changed automatically to external speakers if the TV is turned off. I can imagine that this feature is not ...
1
vote
0answers
117 views

Script to make the x red button kill the app

Quick background: new mac, long time windows user; not scared by linux and scripts. I am currently using RedQuits to make the x red button quit de app, not just close the window. It is a great ...
1
vote
0answers
149 views

How can I detect and remount my time machine sparsebundle?

I currently have my Time Machine sparse bundle residing on a network drive plugged in to my router. I have a script that runs at login that auto connects to the shared drive and mounts the ...
1
vote
0answers
134 views

How to detect locked screen / login-session from a script?

I am looking a way for a script (either bash or AppleScript, doesn't matter) to detect whether the state of the screen or the user login session is locked or not (i.e. the user will need to type in ...
1
vote
0answers
310 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
0answers
171 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 ...
0
votes
0answers
15 views

Tagging/organizing based on keywords in content

I have a series of markdown files with YAML headers, let's call them A, B, C, D, and E. I need to organize them into "binders," where each binder is some subset of these, for example: Binder alpha ...
0
votes
0answers
40 views

Need Apple Script to redirect work mail - Mail rules don't work

I have to use MS Exchange at work for email, so I have Outlook and Apple Mail set up. I want to use Gmail but POP is disabled for us, so I can't just pop it to gmail. So, I tried setting up a rule in ...
0
votes
0answers
23 views

What scripting framework could work with google translate for a non-programmer?

So I want to create a small workflow that I can integrate into my OS that does this: Translate selected sentence with google translate (fixed languages) and make it automatically get pasted where I ...
0
votes
0answers
23 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
0
votes
0answers
13 views

Is it possible to send a badge notification to an arbitrary application (as if from a shell script)?

I'm still not sure how I'd keep track of it (the API makes it seem like you can't just say "add 1 to the current number"), but is this even possible? I thought terminal-notifier have such an option, ...
0
votes
0answers
82 views

Notification message's delay before hide

I made a script to upload images, it shows a notification, but it stays on screen for a very long time until I close it by click. Is there a way to decrease the delay for this notification?
0
votes
0answers
31 views

Log time and battery percentage on charger disconnect

Is there any way to create an event or a script that will log the current time and battery percentage each time the charger is connected or disconnected?
0
votes
0answers
71 views

How can I open a URL on connecting to a specific wifi network in OS X?

Some wifi networks require logging in through a browser after connecting, in order to gain internet access. In many cases it is possible to log in by opening a specific URL without having to click ...
0
votes
0answers
49 views

Script to create a new “To Do” in Mail.app

I've been dorking out with GeekTool and like my simple geeklet that displays my uncompleted tasks right on my desktop. I made a service with automator to let me create new To Do's in iCal whenever ...
0
votes
0answers
48 views

Script to set brightness back on only if it was off before closing the lid

Set brightness to zero -> close the lid -> forget about brightness -> open lid -> doom! No idea if this is only at some OSX release or in all of them... I didn't experience this myself (yet), but ...
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
0answers
67 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 ...