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)

0
votes
0answers
14 views

Enable remote management remotely on a mac

I am trying to use remote desktop to send a script to all Macs on my network that creates an additional admin account and hides it. I am trying to do this using Apple Remote Desktop. However most of ...
0
votes
1answer
44 views

Make script run without interrupting GUI experience

I have an AppleScript that automatically opens SelfControl.app to help avoid distractions when I want to be working. The script is very similar to automate an Internet content filter, and it is ...
3
votes
1answer
58 views

Why does this cause Mac OSX to print over SSH?

While screwing around and breaking things I came across these stupid commands (if executed in order it causes what I got): cd / && cat vmlinuz cd /boot/ && cat init* It causes ...
1
vote
0answers
6 views

Copying AFP Path with Automator

I'm updating a Service I created in Automator a few years ago that copies a file path with a certain format in order to be clickable in "Messages". The problem now is that it doesn't work with new ...
0
votes
1answer
37 views

Send Command to Add remote users through ARD

so I'm trying to create an extra admin account on all Macs on the network. There are quite a few so I'm trying to do it through Apple Remote Desktop. Do you guys know how to do this? This is all I ...
0
votes
0answers
16 views

Script to organize photos

I have a bunch of photos in different folders and I would like to organize them into a single directory structure. Many of the photos are duplicated. I would like to organize them into year/month ...
0
votes
2answers
40 views

Add admin account remotely

So I need to add an admin account to multiple macs remotely. All of these macs already have an admin account (so we want to add an additional admin account) and they are bound to AD (worth mentioning ...
0
votes
0answers
37 views

Conditional lsof loop in bash script

I found this example of a conditional lsof loop and want to adapt it to my situation. typeset fSrc="/path/to/sourcedir" typeset fTgt="/path/to/targetdir" while : ; do ls /path/to/sourcedir | ...
2
votes
1answer
52 views

Bash script with lock folder problems for large files

My script is: #!/bin/bash # Path to a lock folder LOCK_PATH="/Volumes/PROOFS_WATCH/copy.lock" trap 'rmdir "$LOCK_PATH"; exit' 1 6 15 if mkdir "$LOCK_PATH"; then echo "Lock file did not ...
1
vote
1answer
95 views

Bash script - Delay cp command until after file write is complete

cp /Folder1/*.mov /Folder2/ cp /Folder1/*.mov /Folder3 rm /Folder1/*.mov This runs every 60 seconds using Chron that copies any *.mov file from one folder to 2 other folders and then removes the ...
0
votes
0answers
12 views

osx automation using spaces

My ultimate goal is to write an automation script that will collect all the open safari windows in a specific space and spit out the URLs. Can spaces be addressed using scripting?
3
votes
1answer
40 views

Running shell scripts in single-user mode

I'm planning on running a couple of scripts in single-user mode to speed up (and simplify for less savvy users than myself) the configuring of a few aspects of some Macs that I set up for other ...
2
votes
0answers
17 views

How can I detect an incoming call on Yosemite

I'd like to detect an incoming Facetime call and run certain scripts as a result. I'd like to achieve something similar to when iTunes pauses when there is an incoming call, but I would run my own ...
0
votes
0answers
8 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
0answers
24 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
52 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 ...
0
votes
0answers
11 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
2answers
37 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
214 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
23 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
1answer
55 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
0answers
41 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 ...
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 ...
1
vote
1answer
50 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
103 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
18 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
297 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
34 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
170 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 ...
-2
votes
2answers
45 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
24 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 ...
0
votes
1answer
41 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, ...
1
vote
1answer
39 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
2answers
36 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
66 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 ...
0
votes
3answers
245 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
204 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 ...
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
54 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() { ...
2
votes
2answers
60 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
38 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
44 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
51 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 ...
4
votes
1answer
324 views

On OSX what is the opposite command to “say”, i.e. what command is there for speech recognition?

I'd like to be able to enter a command that registers a speakable word that OS/X can listen for all the time. When the user speaks that word, it should launch an app. Similar to the "OK google" idea. ...
1
vote
2answers
96 views

find -printf work around

I'm trying to use a script to call compare file size. Unfortunately the version of find on my mac does not support the -printf switch. Any suggestions?
1
vote
2answers
85 views

Escape sequence in terminal or iTerm to jump to absolute column?

Is there an escape sequence which I can use to jump to an absolute column in OS X Yosemite Terminal or iTerm? In other words: echo 12345678901234567890 echo \StartAtColumn10 A10 \StartAtColumn2 B2 ...
2
votes
1answer
265 views

Move all contents from a folder to another with shell script

Why does this work? mv /Users/diogosaraiva/Music/Youtube/Novas/* /Users/diogosaraiva/Music/Youtube/Tratadas …but the commands below don't work? mv "/Users/diogosaraiva/Music/Youtube/Novas/*" ...