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)

23
votes
5answers
17k 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 ...
0
votes
0answers
7 views

Script iPhone notifications

How can I create notifications on a jailbroken iPhone? I'm hoping for something similar to growlnotify on OS X which lets me send a notification from a shell. (Tagged Cydia because I'm hoping ...
0
votes
2answers
131 views

How to print result of some javascript execution in ScriptEditor?

I want to test a piece of a very simple javascript and print out the result. The Script Editor however only prints out undefined in the Result pane. What is the easiest way to print out the result? ...
0
votes
0answers
18 views

Convert .docx to .epub with apple pages using command line

Pages has an File > Export To > ePub... option that I'm using to manually convert a Word document (which Pages can open directly) to ePub format. I'm basically looking for the equivalent of: ...
0
votes
1answer
44 views

How to re-span a cron-like launchd script in case of script error?

I have a cron-like launchd script (StartCalendarInterval) that does a backup of some website data once per day: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD ...
1
vote
1answer
1k 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?
0
votes
0answers
10 views

View output from script running in background

While messing around with some Ruby programming (Using OS X 10.9.x), i have constructed a script which is forked to the background, and constitutes a loop which only exits after another process is ...
0
votes
1answer
1k 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 ...
3
votes
1answer
15k views

Full privileges on .command file, but it says I don't have appropriate privileges

I have a command that I regularly need to run in the Terminal (for application code signing). Normally I launch the Terminal, press the up arrow until I reach the command I want, and then hit enter. ...
0
votes
2answers
35 views

OS X - 'Clickable' script to erase files?

I use Latex to write my documents. Latex creates MANY auxiliary files to compile a document. I often times want to clean my working directory. When I was working on Windows, I used to keep a .bat ...
0
votes
1answer
36 views

How Can I Convert A .TXT File To A .CSV File Without Losing Any Of The Content Of That Document?

I've been trying for about 4 days now to complete the seemingly simple activity of converting an OS X keychain text dump to a correctly formatted .csv with no progress, much less success. I posted a ...
0
votes
1answer
87 views

AppleScript - GUI Scripting and setting checkbox, radio button and field values

I'm working on an GUI scripting AppleScript that will, for the open FileMaker Pro Advanced document, go to the File menu and select the File Options dialog box, then set some checkbox/radio button and ...
0
votes
0answers
18 views

Script - Audio Files - Find, Count and Sort by type

I have a very large audio collection I have to sort. It's a mixture of M4A, FLAC, AIFF, WAV and MP3. It's the result of years of work by a now deceased person who sat in their garage ripping their own ...
0
votes
0answers
28 views

Organizing TV Show with automator & tvnamer

Previously I used Hazel (http://www.noodlesoft.com/hazel.php) and tvnamer (https://github.com/dbr/tvnamer/) to sort and rename my TV Shows Collection. I'm trying to simplify the process by using ...
1
vote
1answer
267 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 ...
12
votes
7answers
11k views

Create a new (.txt) File in Finder - Keyboard Shortcut

I wanted to know if there is way to set keyboard shortcuts to make new files in Finder. For example, by default, you can create a new folder using CMD+Shift+N. Is there a keyboard shortcut to create a ...
0
votes
0answers
12 views

Silent installer for remote macines

I am trying to create a script to install logmein silently (or in the background) with out enduser input. I have the process to download the zip and create an admin user (for later login) however I ...
5
votes
4answers
2k 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: ...
1
vote
1answer
45 views

Display dialog with current iTunes album cover

I would like to display with AppleScript a dialog that shows my current title, artist and album. In addiction to that the icon of the dialog should be the album cover of the current album. Is that ...
0
votes
1answer
91 views

Text-to-speech with 2 languages

I am studying French and to practice my pronunciation and to learn the words, I want to have my mac speak the words out loud. My mac should say the word in English, and after that, he should say the ...
0
votes
1answer
17 views

Reset dock icons while log off

I have an iMac for public use, I want to ensure the dock icon won't be changed by others (i.e. keep factory setting). Currently I know the following two commands can do this: defaults delete ...
3
votes
1answer
194 views

Script to change Computername/hostname causing bizarre Terminal behavior

I have a script (mostly borrowed) which utilizes scutil to rename computers based off of values in a CSV file. It matches the serial number to a computer name, sets a variable, and then renames the ...
0
votes
0answers
31 views

How to create two column table script?

Is there a way to create a two column table in TextEdit with some way to create new cells by hitting the Return key, as you can do in Word? Alternatively, is there a way to achieve the same effect ...
1
vote
3answers
103 views

Built-in GUI-based ASCII only editor for OS X

I am trying to programmatically invoke an OS X editor from a script which: does not add smart quotes or any non-ascii characters while editing will work "out of the box" on any standard mac system ...
1
vote
1answer
29 views

Is there a way to see the invisible formatting in my clipboard and/or create the formatting when piping to pbcopy?

Is there a way to see the contents of my clipboard in a way that shows me what formatting metadata is included? Or to get to the question behind the question: is there a way to generate output in a ...
0
votes
3answers
189 views

Login Script for deleting contents of /private/var/folders

We have fleets of laptops that have limited space once our software is installed on it. What ever the issue that is causing the creation of theses files and --err not flushing them, we are ignoring ...
-2
votes
2answers
43 views

How do I make this terminal script work properly?

I want it to appear like I'm contacting a bunch of ip-adresses and it works fine until the third line in the code and I want to be able to fix it. Also the 4 bottom lines don't work. So this is ...
0
votes
1answer
22 views

Using Fluid.app is there a way to switch tabs periodically?

I'm using Fluid.app as a way to display content from URL for monitoring my servers and other services in my data center. I have a few tabs open in this fluid.app window to display another URL with ...
3
votes
4answers
17k views

Way to logout a user from the command line in OS X 10.9

I want to logout my Mac OS X from the command line. My OS X version is 10.9. I tried command pkill -KILL -u uid, but this command didn't work out. Is there a command that can be used to log out a user ...
2
votes
3answers
570 views

How to check installed OS X version from the command-line on each partition?

I'm managing a lot of Macs and each machines has several partitions with different OS versions. I would like to create a script that I could run to do an inventory of all partitions of all machines ...
5
votes
5answers
4k views

Alternatives to command line unzip?

I've found that the command line unzip tool doesn't gracefully handle some of the files I'm unzipping: it makes a bunch of junk directories, and creates files whose resource forks aren't found. ...
0
votes
1answer
40 views

How to Change Scroll Speed Programmatically with Applescript or Shell Script

Is there a way, using either applescript or a shell script, to change the scroll speed? I don't even know where to begin to look for a mechanism for this. Oh, and no third-party applications either, ...
4
votes
1answer
97 views

What are the differences between Applescripts saved as *.scpt and *.applescript?

It seems to me that those scripts that are saved as *.applescript are always meant to be the raw, uncompiled text while those that are saved as *.scpt can be either the raw text or the compiled ...
0
votes
2answers
30 views

Post-boot and login notification

I am using 10.10.2 and I have limited experience with Terminal. I would like to create a script which would notify me (on screen) when all of the startup processes are completed, post-login. The boot ...
0
votes
2answers
65 views

How can I create a script with multi command

I tried to create a script on OS X. I do something wrong. I want to execute 2 command: defaults write com.apple.finder CreateDesktop -bool true and killall Finder I saved and chmod the file but ...
0
votes
1answer
39 views

Long running process defined as Service

I created a service for starting a Virtual Box headless, which works fine - but the service does not end until the virtual machine is stopped again (the spinning wheel is in the menu bar (or whatever ...
2
votes
1answer
27 views

Can't get Terminal to Display Colour (Mavericks)

I've recently been working on a script to backup files, etc. for my own use but recently I thought it may look nicer if I was able to cleanup and have everything nice and tidy (with colours and what ...
11
votes
5answers
5k 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
2answers
175 views

Automatically Move Files Created In Folder

I have a project I've inherited from an ex-employee that is missing the source, so I am attempting to debug from the temp files it creates in a directory. The issue is that it creates and deletes some ...
0
votes
0answers
9 views

Recursively remove trailing space on all files and folders [duplicate]

I want to recursively remove trailing space on all files and folders. ruby -e "Dir.glob('* ').each { |name| File.rename name, name.chomp(' ') }" works for PWD. How do I run it on the whole ...
2
votes
1answer
1k views

Why won't wget work with cron?

I've been using the bashpodder script recently, and while the script works beautifully when I use it in the command line, the crontab I created for it doesn't work at all. It fails when it has to use ...
18
votes
4answers
5k views

Concisely starting Mac OS apps from the command line

I do a fair amount of work in the command line, and I find myself defining a lot of aliases of the form: alias skim='/Applications/Skim.app/Contents/MacOS/Skim' Is there a way to add magic such ...
1
vote
1answer
53 views

Can I write a script to take an action right before the computer is going to go to sleep?

I think my computer is randomly not syncing email correctly with Apple Mail, but it's only a problem when it wakes from sleep. That issue is neither here nor there. What I'd like to do is write a ...
0
votes
1answer
48 views

Turning Off Wi-Fi During Logout Script Doesn't Work With Launchd

I'm writing a launchd plist and a shell script on my MacBook running Yosemite to automate the following scenario: Turning off Wi-Fi when the user logs out. Here's my script: #!/bin/sh onLogout() { ...
0
votes
3answers
149 views

Can I set the primary Language of OS X by using shell script or AppleScript?

My computer is mac mini (late 2012) with Yosemite 10.10.1 installed. The primary language of the system is English, with Chinese being the second language. Sometimes I need to use the Maps.app, and ...
2
votes
2answers
57 views

Script to relocate the menu-bar on dual monitors set-up

Is there a script that could be written to achieve this: In System Preferences/Displays... is it possible to relocate the menu bar ...via a script? My set-up is one monitor and a Cintiq. I either work ...
1
vote
2answers
35 views

In which .plist is the underscan setting stored?

I'm trying to write a script which changes the underscan value on my Mac mini, but I haven't found the .plist file containing the setting. Does anyone know where the underscan setting is saved?
0
votes
1answer
43 views

Is there a way to get a list of all currently running program's window titles with AppleScript?

I'm looking to write a script which outputs a list of all the window titles of all the currently running programs. Is there any way to do this with AppleScript? I tried running the following code: ...
2
votes
0answers
46 views

How to access GPS data from command line on jailbroken iPhone

Are there any binaries available via the command line to get information from the GPS on a jail broken iPhone? I've searched through Cydia and haven't found anything, but I wouldn't imagine this ...
1
vote
1answer
1k views

AppleScript To Manipulate VLC

I want to do a script, that it can launch VLC player, and in VLC player "Open a file", then "Select a folder", then click on "add" then "play" it. I think that Automator can't do this. But ...