2
votes
0answers
16 views

Run script when I connect something to the line in port?

I'm connecting my phone to my mac via the line in port to listen to podcasts. I'm using the app LineIn to do this and I was wondering whether there was anyway I could have: My audio input be set to ...
3
votes
1answer
356 views

What is an alternative to a BAT file on Mac?

What is the alternate for BAT file (Windows) on Mac? Does different version of OS X have different format of BAT files? I am trying to create a BAT file on Mac which normally changes directory while ...
0
votes
0answers
15 views

Tagging/organizing based on keywords in content

I have a series of markdown files with YAML headers, let's call them A, B, C, D, and E. I need to organize them into "binders," where each binder is some subset of these, for example: Binder alpha ...
2
votes
1answer
189 views

How does this complex BASH shell script work?

Apple Support Community member Linc Davis developed this command to aide in diagnosing issues. The output gives a general overview of one's system and is very similar to the program etrecheck. But, it ...
1
vote
1answer
77 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 ...
1
vote
1answer
30 views

How can I run a application in Automator?

I want to run an application in Automator but there is no run program. Operating system and stuff: OS X Lion 10.7.5 Automator 2.2.4 Memory: 3GB
1
vote
1answer
82 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
0answers
21 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 ...
0
votes
1answer
85 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 ...
1
vote
1answer
327 views

How to make a playable DVD iso from a VIDEO_TS folder?

I used to have a script that converts a VIDEO_TS folder into an ISO that plays ok in VLC but it's gone. Anyway, this command gets me most of the way there: hdiutil makehybrid -udf -udf-volume-name ...
1
vote
1answer
20 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 ...
1
vote
2answers
84 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 ...
2
votes
2answers
289 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 ...
0
votes
1answer
80 views

What is the proper way to use the cut command on ps command output

This question is related to a question I posted on rogue firefox procesess. It relates to firefox processes following image uploads that I have been having for a while. I am trying to get to the ...
-1
votes
1answer
34 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 ...
1
vote
1answer
351 views

Setting a firmware password

Currently trying to use a script (preferably shell) to setup the firmware password on a fresh OSX install. I obviously found this: http://osxdaily.com/2014/01/06/set-firmware-password-mac/ which ...
2
votes
1answer
65 views

Execute Shell Scrip individually for each selected file in Finder

I am trying to create an automator workflow that will do a google search for the filename of each selected file in finder. Unfortunately the workflow I have created works just with one selected ...
0
votes
0answers
82 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?
1
vote
2answers
118 views

How to make a message appear on the screen?

I'm trying to set up a kind of intercom system between Mac, Windows, and Linux boxes at home. Question: How can I make an arbitrary message appear on the graphical screen of Mac OS X? For instance, ...
2
votes
1answer
3k 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. ...
5
votes
5answers
1k views

OSX Bash for loop - issues with spaces in folder names?

I'm getting a bit confused on how to handle spaces in path names when returned in a for loop. Rationale: I'm cleaning up the permissions on folders and files that I copy over from Windows. Most of ...
0
votes
0answers
31 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
70 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 ...
1
vote
1answer
150 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 ...
2
votes
1answer
898 views

Trouble in Automator's Shell Script after OS X 10.9 Mavericks upgrade

I've got a problem. I use from lot of time an Automator's shell script: cat >> ~/Dropbox/ClipBoard/Appunti\ Mac\ del\ $(date +\%Y-\%m-\%d).txt It ever worked but, after Mavericks upgrade, ...
1
vote
0answers
116 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 ...
2
votes
2answers
275 views

How do I get Automator to process images using ImageMagick in a command script?

I'm making an Automator workflow that uses the shell script action to process a selection of images with the imagemagick composite command. Only I'm having issues getting it going. According to the ...
1
vote
0answers
130 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 ...
0
votes
3answers
1k 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 ...
1
vote
1answer
38 views

Can two apps be tied so that when one opens or closes, the other does so?

Can triggers be set up so that when "App A" starts, another "App B" gets started automatically? Ideally, the solution would send a quit message to "App B" when "App A" quits, but the important part is ...
0
votes
0answers
14 views

How do I use Mathias .osx defaults? [duplicate]

I just got a mac and am still familiarizing myself with it. I was taking a look at: https://github.com/mathiasbynens/dotfiles/blob/master/.osx Not sure how to use it!
1
vote
1answer
99 views

Export or list system settings that deviate from defaults

I am looking to generate something similar to this osx settings script. I'm not having any luck finding ways to perform a diff between system defaults and my customized settings. Anyone know of a ...
2
votes
1answer
237 views

How do I use say command creatively to prank my coworkers/friends?

I'm designing a creative / funny prank for OSX via command line. By running in the background, most users would not notice it when she/he first starts using the computer. Using say command with ...
1
vote
2answers
88 views

Is there a user-friendly app that can create an archive of system.log files and the like?

Background I have this command to create a temporary collection of selected log files – sudo tar -czf $TMPDIR/archive\ of\ install.log\ and\ system.log\ files\ only.tgz ...
0
votes
1answer
647 views

Terminal bash commands stopped working

I was trying to install some stuff for scala development on my MAC, and probably I managed broke the shell/terminal while I was mindlessly running some scripts that I don't know. Now when I start the ...
0
votes
1answer
52 views

Show When Applications Were Opened and Closed

I'd like to be able to see a list of applications that were recently opened and quitted on a per user basis. Ex: 19:25:34 Google Chrome Canary opened by John Smith 20:45:32 Pages quitted by Julie ...
1
vote
2answers
236 views

Need Help with an Applescript / plist

This has been a learning experience for me. Everything checks out logically to me in this script/ plist but something isn't correct. Everything runs, but then the script runs every minute which is ...
0
votes
1answer
35 views

Is it possible to show custom icons in the Scripts menu?

You know that "scripts" menu you can show in the right side of the menu bar? It's very useful. I'm talking about this menu: I've set some custom icons for the files in the scripts folder using the ...
4
votes
1answer
1k views

How to batch convert word documents to pdf?

Is there a scriptable way that I can convert several MS Word documents to PDF? I thought this might be possible using python, but I am unable to find any advice online on how best to do this.
2
votes
1answer
55 views

Sharing settings report (security audit)

I am new to Mac administration and struggling somewhat on how to programatically report in the settings in the Sharing Preference panel (10.7 and 10.8). Basically - I want to report in which settings ...
3
votes
1answer
127 views

Detecting that a script is run within ARD

Does anyone know of a way to detect that a shell script is running within ARD (vs. running the same script locally on the machine)? I looked at detecting that we are running in interactive mode - ...
0
votes
0answers
2k 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 ...
1
vote
1answer
626 views

“Self Destruct” script to remove certain directories and/or applications

Let's say your work situation isn't going so well, and you suspect the end is near. How would you prepare a script (or similar) to remove your personal files and applications from your work computer ...
6
votes
3answers
1k views

How to disable individual USB ports by script?

I am looking for a script which will allow me to disable one specific USB port on my Mac mini. It would only serve a purpose if it works in real-time and didn't require a reboot. I've found scripts ...
3
votes
4answers
1k 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
vote
1answer
319 views

double password entry to access account

I have the Require password 4 hours after sleep ... option in Security and Privacy System Preferences set and am running a script with launchd to suspend my session at a certain time of day (see this ...
0
votes
2answers
456 views

lock account and sleep

Is there an easy way to lock my mac and then immediately sleep, all in one command? I know I can show the login window and then choose the sleep button, but I'd prefer one step rather than two (and a ...
2
votes
1answer
903 views

Is it possible to write a script to change the Energy Saver settings in OS X (10.7.3)?

Basically, whenever I know I'm going to be gone, or if I'm going to sleep, I change the Energy Saver settings in System Preferences in OS X (10.7.3) for Power Adapter to: Computer sleep: 1 min ...
2
votes
1answer
114 views

Start program in response to system events (like ip address changes, etc.)?

I want to start a program in response to system events, such as: IP address changes WIFI connectivity changes (whether I'm connected, and/or which network I'm connected to) Volume (as in disk) ...
1
vote
2answers
875 views

What is your preferred way to start a (shell) script from the GUI?

I was wondering what ways there are to start a (shell) script from the GUI, e.g. double-clicking an icon in Finder or launching via Spotlight. This is not about opening a terminal and "manually" ...