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)

1
vote
0answers
8 views

'Add notes' to an Calendar event using Automator

I would like to build a 'Service' for selected text which: Get the currently selected text Creates an Calendar event adds the selected text as a 'note' for that Calendar event I prefer Automator ...
1
vote
1answer
20 views

OSX How can I get the dev name associated to a Volume name

I am creating a bash script to unmount my usb drive after the backup is done. To unmount the drive I use the command: diskutil unmount disk4s1 But sometimes when I plug my usb drive it gets a ...
1
vote
1answer
23 views

OSX Unmount usb disk drive from Automator bash script

I have a task in automator to make my backup, it runs shell script code, lot of code is working well but the unmount command doesn't works, I don't get unmount the unit after backup. I checked to run ...
4
votes
1answer
119 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 ...
5
votes
2answers
966 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
1answer
21 views

Finding file in parent folder of an AppleScript

I have an AppleScript that calls another script (a perl script in this case) which resides in the same folder as the AppleScript. Now I'm trying to put the script into a variable like this: tell ...
3
votes
2answers
831 views

Why setting image as its own icon with sips result a blurred icon? Are there any alternatives?

I've successfully changed icons using the procedure described in an another question: Changing or setting a file or folder icon programmatically. Either my sips (or Finder) got broken afterwards or I ...
36
votes
8answers
14k 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
15 views

Applescript app to open but not run a script file? [closed]

I have applescript applications in my menu bar. I'm creating a new one which contains a part which has an endless repeat loop. The problem is, if I run it as an application, there's no way for me to ...
0
votes
0answers
13 views

Detect if iPhone trusts this computer

I'm working on a script that automates import photos from iPhone in Mac Photos.app How can I find out if iPhone trusts this mac? I've tried system_profiler SPUSBDataType and ioreg -lp IOUSB but ...
0
votes
1answer
21 views

Send notification from command line [duplicate]

On Mac OS X, some applications will display a notification that appears briefly in the upper-right corner (e.g., when I receive email). Is there a way to generate a notification from the ...
1
vote
3answers
51 views

How can I apply a terminal script using ssh to all users?

I need to disable Google chrome's print preview option using the script "defaults write com.google.Chrome DisablePrintPreview -boolean true -contributed by CutMaster", to a mac using ssh and apply ...
-1
votes
0answers
16 views

Apple Script for automation task in Mail

I am looking for a genius to help me develop a script that: Extracts attachments from my emails on receipt Files them in my local drive in a folder named after the sender Put the date and time stamp ...
0
votes
1answer
29 views

Is it possible to create a service using only the shell and bypassing automator altogether?

Using automator is somewhat of a tedious task. Using the shell in the Terminal is much easier all around. Even using the "Run Shell Script" action inside automator is not the same as using the actual ...
0
votes
3answers
43 views

Easiest way to get path of currently-opened file in Adobe Acrobat?

When viewing a file in Adobe Acrobat Pro XI on OSX Yosemite, I sometimes want to send the file to another application. To create an action in KeyboardMaestro, I need to get the path of the ...
0
votes
1answer
13 views

Duplicate calendar events in Outlook 2011

Does someone have a script to merge or delete Outlook 2011 duplicate calendar entries?
0
votes
0answers
22 views

Live Photos Metadata

I've been trying to transition from Apple Photos to a plain folder tree (and then use dropbox). For this to be useful, one needs a good naming scheme. I did a bit of googling and using Hazel seems ...
10
votes
6answers
5k 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 ...
-1
votes
1answer
19 views

Backing up data

I have a script that used to run daily that looked like the following to backup my mac. Backup script pastebin As you see here, this script is TERRIBLE because it deletes everything in the folder ...
1
vote
2answers
2k 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 ...
1
vote
3answers
99 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: ...
0
votes
1answer
18 views

How create an identical timestamp format as used in ppp.log file in a shell script?

In the need to add custom logging messages to ppp.log, I see that the date and time are missing when outputting the command to >> /var/log/ppp.log. Other pppd related messages in ppp.log are ...
0
votes
0answers
17 views

Silent installer for remote machines

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 ...
0
votes
0answers
33 views

AppleScript Remove Safari Cache but keep cookie and history

I want to get rid of Safari cache and website data but keep cookies and history. The script will be added to my computer startup script for optimizing the system performance. I was considering this ...
0
votes
1answer
40 views

Is there a `watch` command native to Darwin/OS X?

I have a script that I'm trying to port from Linux to Darwin/OS X. The Linux version currently depends on the watch command, which doesn't appear to be installed on Darwin/OS X by default. What's the ...
0
votes
1answer
29 views

Clean shutdown/restart from terminal in 10.7+

I have a headless system that is controlled remotely that I need to shutdown/restart in an automated way (without the use of VNC or local keyboard/mouse). Using various commands via SSH or via my ...
3
votes
2answers
2k 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?
3
votes
1answer
42 views

Need my automator script to display the regular shutdown prompt before shutting down

I'm using the script below to trigger a shutdown but I would like it to give me the normal warning menu with the 60 sec. countdown, I can't figure out the warning menu. tell application "finder" to ...
0
votes
1answer
96 views

How to create an Automator service to run a script on all files in a folder

I want to create a service using Automator to run a shell script on all files in a folder, say delete all log files. What I have done is Created a new service in automator. Added a "Run Shell ...
3
votes
1answer
119 views

Problems reconnecting to WiFi if connection is lost

In the area where I live there are frequent power outages for a few seconds. I am connected via a router, which (of course) restarts each time. Unfortunately my Mac (2011 MB Pro) does not ...
0
votes
2answers
59 views

How to write a script that runs whenever a new file is added to a specific directory?

I've never written a script for OS X, and I don't really know which scripting tool i'll use for this task. Here's a pseudo code for the script I want to build : whenever a new file X is added to ...
1
vote
2answers
38 views

Problem with scripted account deletion syntax

I'm working on an account cleanup script module that can handle the hidden and unhidden accounts we're creating in bulk on new MacOS systems. We've kept the logic simple to start. However I keep ...
1
vote
1answer
1k 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
48 views

Dtrace script newproc.d stopped working after upgrade, because of missing proc:::exec-success probe

I'm trying to run: $ sudo /usr/bin/newproc.d which suppose to snoop new processes as they are executed, but it fails with the error: dtrace: failed to compile script /usr/bin/newproc.d: line ...
0
votes
0answers
15 views

Can a script-based Service be used to invoke speech output of selected text using VoiceOver?

The usual text-to-speech feature doesn't work with the user-customized pronunciation from the VoiceOver settings. Could this shortcoming be worked around using a script and Service via Automator?
6
votes
6answers
31k 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 ...
1
vote
0answers
28 views

Error in dtrace script that print process cmdline + parent name.

I'd like to have dtrace script that for every new process, print it's commandline + it's parent process name. here's my script : #!/usr/sbin/dtrace -s proc:::exec { self->pexecname = ...
4
votes
1answer
83 views

How to create a service that puts selected text into quotation marks?

I'd like to create a service that puts any text I select in TextEdit or web page text editors into quotation marks. I understand Automator is the tool to use, but how do I create this action using ...
1
vote
1answer
26 views

osascript dialog box is blocking.

I'm using osascript to display dialog box from bash script, but it's blocking the script, until i press the 'ok' button. I wonder if there's a way to make this display window asynchronous. osascript ...
1
vote
1answer
33 views

AppleScript: Display alert or restart when application terminates/crashes?

I rely on Dropbox for syncing work files between two computes that are powered on 24/7. For some reason, Dropbox terminates (crashes or quits) after long periods of time, with no explanation. I just ...
1
vote
1answer
55 views

OSX - Button spam help?

I want to be able to spam the jump button without having to hit the space bar multiple times, and I have a line of code but I'm not too sure what it is doing. tell application "System Events" ...
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
1
vote
0answers
17 views

Mass Change Security to Mac App only option

looking to see if others have created a successful way in using ARD to deploy a script to change the security settings from Mac App & Identified developers to Mac App store only. OSX - 10.9.5 ...
0
votes
1answer
23 views

Executing executable file by means of script file

For executing file in linux terminal we run something like this: ./sflm -start Now, if i want this procedure is done by executing a script file what should i do ? I want to for example run this ...
4
votes
1answer
66 views

Change font of Terminal programmatically w/o restarting

At home I've got a nice big display that unfortunately does not have the same resolution as my retina macbook does. I'd like to use a pixel-font on the low-res screen and a nice smooth one on the ...
1
vote
3answers
4k 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 ...
0
votes
0answers
46 views

Run Script at Shutdown

Is no way to run a shell script immediately before system is switched off? What I found via google was just to use rc.local.shutdown or so, but it seems that this function was kicked out on previous ...
8
votes
5answers
18k views

How to persistently define aliases in Terminal

I want to add aliases to my environment so that they are available in all Terminal instances. I got this answer: Yes, you can put it in your .bashrc, .bash_profile or .profile. On some systems ...
0
votes
0answers
34 views

OSX handling of USB Drives and Permissions - need clarification/explanation

I'm new to the site, and well, new to MACs. I have an image (dual boot yosemite and win7) on some old iMACs, late 2009s. When I deploy this image, sometimes my bootmenu disappears and I have to ...
1
vote
1answer
71 views

What is the crlcache keychain and why do I have so many of them?

I run the keychain command-line app that allows me to fast-sleep my Mac or quickly lock a keychain. However, it seems to think that I have many crlcache keychains: When I search for crlcache on my ...