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
2answers
206 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 ...
1
vote
2answers
141 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 ...
1
vote
1answer
14 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
28 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
25 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
87 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
253 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
48 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
60 views

How can you set up a free, universal OS X-wide ‘autosave’ script?

I want to set up a free solution in OS X for a universal ‘autosave’ function (given Apple’s own solution is limited to only a few apps - at least for now), and let Dropbox do my file versioning and ...
0
votes
1answer
28 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
157 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
18 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
62 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
308 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
233 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
255 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
215 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
28 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
24 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
174 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
153 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
623 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
10 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
36 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
35 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
104 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
131 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
107 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
211 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
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
4 views

a scripting language to compare rows of web search

a scripting language to compare rows of web search like this! i want to compare between arrival and departure time difference for example a websearch in irctc
0
votes
0answers
12 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 ...
0
votes
0answers
20 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
21 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
10 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
73 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
24 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
55 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
44 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
45 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
41 views

How to verify when disk drive detection is done (diskutil will list all drives) during boot process?

In a system where SATA disks are connected to a third party (Highpoint) controller, the wish is to create a bash shell script that will run every system boot. The shell script will test whether each ...
0
votes
0answers
262 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 ...
0
votes
0answers
1k 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
66 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 ...