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
2answers
38 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 ...
3
votes
0answers
24 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 ...
1
vote
0answers
24 views

Automate/wrap a few SH scripts in one - Deploystudio

Right now I have a few .sh scripts that are being deployed via Deploystudio. I've created seperate scripts and tasks for each command. Though, it doesn't really function. The logs tell me that I need ...
21
votes
6answers
7k views

How can I change a file or folder icon using the Terminal

How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?
0
votes
0answers
29 views

Hooking into establishing Wi-Fi connection on Yosemite

Is there a way to hook into the process of establishing a Wi-Fi connection for executing some arbitrary actions (i.e. scripts or something) on certain events like connection established, connection ...
4
votes
5answers
2k views

Toggle “Use all F1, F2 as standard keys” via script

I toggle the "Use all F1, F2 as standard keys" setting very often and would like to automate it via a script (or a keyboard shortcut). Is it possible? I've tried to Google the right arguments for ...
0
votes
0answers
26 views

Shell script to boot OSX in recovery mode and execute another shellscript

I'm working at a University and we are restoring our Macs using Apples ars which works great. The process is to manually go to the computer - reboot it in recovery mode and then run the ars command to ...
1
vote
0answers
26 views

How to have Finder open 'Pictures' folder upon iPhone connected and photos imported with AutoImporter.app?

I have a nifty setup on my MacBook Pro, where, upon connecting my iPhone, I have AutoImporter.app (/System/Library/Image Capture/Support/Application/AutoImporter.app) automatically import whatever ...
4
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 ...
0
votes
1answer
21 views

How can I write an Apple Script in order to check if bluetooth and ethernet are on or off?

I'm trying to write a little script in order to check whether or not bluetooth is on and whether or not an ethernet cable is plugged in. I searched the System Preference dictionary built in the app ...
7
votes
4answers
6k views

Checking for folder/file changes using Automator?

Is there there a way to check a folder/file for changes (includes adding files, deleting files, changes in files,...). The 'Folder action' in Automator is only checking if any files are newly added.
2
votes
3answers
7k 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 ...
0
votes
0answers
11 views

Uninstall CheckPoint VPN Script Prompting For Password

When running the uninstaller sh script in the CheckPoint VPN package from terminal I get prompted for the usual authentication window. But the authentication window does not have focus so when I type ...
0
votes
1answer
48 views

How can Apple Script open a shell script with options in a Terminal window?

I’m trying to use Apple Script to execute a shell script file in a new Terminal window, while sending it options. How do I do that? It seems as if Terminal only interprets the path to the script, and ...
0
votes
1answer
53 views

Can I script my mac to reboot and login at a specified time?

Can I use shell scripts, AppleScript, or some other form of scripting to get my mac to reboot and login at a specified time? If so, how?
1
vote
0answers
29 views

Create a script to turn wifi off on shutdown

Is there anyway to create a script that will automatically shut down the WiFi when I power down my machine? Maybe in Automator?
1
vote
2answers
850 views

Problem with startup script rc.local in OS X 10.10 Yosemite (Running Bootcamp in VirtualBox)

Until OS X 10.9 I could also run bootcamp within Virtualbox (through a .vmdk file). In order to do this I needed to unmount the bootcamp partition after changing the permissions during the OS X ...
2
votes
2answers
141 views

Troubleshooting “Unexpected argument” error when running defaults write

Trying to change the default screenshot directory to a specific folder in my google drive, but when I try the following command defaults write com.apple.screencapture location ‘~/Users/tommy\Google ...
0
votes
1answer
14 views

Switching “TrackpadMomentumScroll” on and of using a script

I'd like to switch the accessibility preference "Scroll with inertia" on and off for a Magic trackpad. The preference can be found in the accessibility preferences/Mouse and Trackpad/Trackpad ...
0
votes
1answer
47 views

Setting environment variables for scripts run by launchd?

I have a script that worked in the past, but seems to be having issues now (I believe it's due to Yosemite). What I had done was created an environment variable that was set to "false" and then my ...
0
votes
0answers
13 views

# always in front

We all know that via system manager we could add programs they should start visible or not visible with the boot/reboot and that after a power-off the device should restart etc ... What is the most ...
0
votes
1answer
36 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
268 views

Automator Script not running under OS X Yosemite

I used to use the following two Automator scripts under OS X Mavericks to find out the source file of the actual wallpaper picture of the main screen and my second screen. After installing OS X ...
4
votes
3answers
3k views

How can I enable SSH without using the gui or apple script on snow leopard?

A while back here How can I enable internet sharing without using the gui or apple script on snow leopard? I asked if any one knows how to enable Internet sharing without using GUI or apple script, I ...
0
votes
1answer
20 views

How to skip the tools during installation which I don't want to install from this automated installation list for osx dev tools?

https://github.com/thoughtbot/laptop/blob/master/mac For example I don't use Heroku so I want to comment out Heroku stuff. But I don't know how to do that. I have forked this script and want to ...
1
vote
2answers
2k 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
3answers
16k views

How Do I Use 'cp' to Overwrite Files?

Using a shell script or Terminal, how do I overwrite files that may or may not be present. I looked at man page for cp, it said use the -f argument to force overwrite. But, it does nothing. $ cp -f ...
5
votes
3answers
342 views

Run Script on Logout Without Use of Logout Hook

I've been looking into running a few cleanup commands when a user logs out, however the old logout hook feature, although still functioning, has been deprecated for some time now so may not be with us ...
1
vote
1answer
52 views

How to parse output from a command in OS X Automator?

I have the following code in Automator but it fails to load the variable with the output from the command. for f in "$@" do output = hdiutil verify "$f" echo "$output" done I want to parse ...
8
votes
2answers
4k 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 ...
0
votes
1answer
58 views

How to enable “Show message on Lock Screen” with Script

So, In Mavericks, you can set text to be displayed on the lock screen by checking the box: System Preferences > Security & Privacy > General > "Show a message when the screen is locked", then ...
1
vote
1answer
41 views

Run script before every Time Machine backup?

I would like to be able to run a bash script just before Time Machine runs, every time This script generates some content to be written on a file which needs to be backed up by TM. I have looked ...
2
votes
3answers
5k views

How do I create an AppleScript that will quit an application at a specific time and then put the computer to sleep?

I've been toying around with AppleScript and Automator to get this thing to work, but I just can't seem wrap my head around it. If anyone could show me an example or give me some tips on how I can set ...
3
votes
5answers
3k views

How to launch browser in iOS Simulator from command line?

I want to launch the browser in iOS Simulator from the Terminal with specified URL. Is there any command for it? So that I can write in a script which will take URL as argument and launch simulator ...
1
vote
2answers
50 views

Delete a currently-open file directly in the application?

OS X's ability to rename or move a currently-open file right inside the application is really handy: To take it one step further, is there a trick to actually delete the current file inside the ...
0
votes
2answers
27 views

Prompting user for input on locking screen

I'm relatively new to OSX (running Mavericks), but my goal is to create a script that reminds me to take notes on the day's work. The script will ideally: run upon the user clicking 'Login window' ...
1
vote
0answers
235 views

Applescript / Automator - Pass variables between them

I have a question about how to pass the applescript input from one computer to another computer's automator input (I created it as a program). I've created the script below to ask for the filename and ...
1
vote
1answer
470 views

Bash Script to Auto-Update (and reboot) all Updates to Mavericks & Yosemite?

I'm seeking a script that I can execute on a newly installed Mavericks or Yosemite computer, that will install all updates, rebooting as necessary and starting again automatically. For instance, I'd ...
1
vote
2answers
312 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 ...
1
vote
2answers
237 views

Script to check Software Version

Hi i'm tryin to write a script to check software version. I want to pass my own variables, which are name of the Application and Version. Here's a copy. It's not working for me currently... i'm a ...
0
votes
1answer
25 views

How to run a script on login whilst being hidden

I have an applescript (scpt) script that I would like to run on login of a user. I would like the script not be visible in the dock, menu bar, etc. (This would probably mean running it in the ...
0
votes
0answers
26 views

What is required to make a bookmark that creates calendar events from values on a web page?

So I have a page that has days and times on it, and I want to know how to make a script or bookmarked script that will find these values and put them into my calendar. Any idea?
1
vote
1answer
2k 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 ...
0
votes
0answers
21 views

automator script for typesetting TeX can not run the TeX engine

In the script below instead of echo $filename I want to have xelatex $filename. However, if we do that the automator gives a running error without any description. Before I set the path I was ...
0
votes
0answers
50 views

Best practice for changing AD domains on MAC, Mountain Lion & Mavericks?

We are changing domain name in our company. I have over 3000 users, that are local and remote, I need to able to change their domain on 10.8.5 (Mountain Lion) & 10.9.5 (Mavericks). I am hoping ...
-1
votes
1answer
37 views

Extract lines from txt file and save as new txt

I have a xyz.txt file looking quite like this: 001this is line one 002this is line two 003and this is line three 004and so on Now I need all those lines as a single txt without the three digit ...
0
votes
1answer
449 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
2answers
100 views

Run script as root whenever any user logs in

What's the best way to run a script with root privileges whenever any user logs in? It should run in the background without prompting the user for a password.
2
votes
1answer
8k 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. ...
2
votes
1answer
84 views

Can I control window size and position when opening files via script?

I have a script that opens three shortcuts to VNC locations that open in Screen Sharing.app. I would like to specify where the windows go, and their size, when these screenshares launch - one ...