0
votes
0answers
8 views

Mavericks startup script

I am trying to write a small script to launch when user logs on. I have searched and got the script to work but unable to run at log on with .plist We have active directory setup. When the user logs ...
0
votes
1answer
55 views

Run a script only at shutdown (not log off or restart) on Mac OS X

Is there any way to run a script only at shutdown? I mean, only when the computer is really shutting down to off state. This script should not run when doing just a log off or restart.
0
votes
2answers
60 views

How can I get a script to run constantly on Mac OS X?

I would like to do this: When the application VLC is open and I press the space bar, it pauses the video and an itunes starts to play. Then spacebar again would resume the workout video and pause my ...
0
votes
0answers
8 views

Accessing a context menu through script in OSX

I want to access a context menu item from a script to integrate with a workflow in OSX. Specifically, I want to access the "Share dropbox link" programmatically to obtain the public url of a file. Any ...
1
vote
1answer
42 views

Terminal command to include currently logged on user

I am trying to write a script that makes our network (active directory) users local administrator on their macs. I have the script that will do this: dseditgroup -o edit -n /Local/Default -a ...
0
votes
0answers
13 views

Run a service action with a file from a shell script

I use CloudApp and it has installed a handy service called “Upload to CloudApp”. I'm writing a build script that I want to hook into this service. Every time it is run I want it to upload the file ...
0
votes
1answer
53 views

MAC Rename files and move them automatically scripting

I want a shell script that runs on a Mac, that when ran, looks for a few things and transfers video files to a specific location on another drive. So when I put in an SD card, I want the script to ...
0
votes
0answers
66 views

Remove from the transfer list when seeding completes

Remove from the transfer list when seeding completes + Remove Data File... When the torrent finishes downloading, hazel starts to process. The only problem Is I would like to seed. So I use the ...
1
vote
0answers
49 views

Gimp script does not have permission to write a jpeg file

I'm trying to run a GIMP script to perform Error Level Analysis. I've downloaded the script (a `.scm file) from here. It does show up in the menu (Image -> Error Level Analysis), shows a dialog, ...
2
votes
3answers
106 views

How can I find folders containg x files of a particular type and output those paths on OSX

I have this script for OSX for finding folders that only contain one file, and if that file is an audio file outputting the path of the audio file find "$1" -type d -exec sh -c '[[ $(find "$0" ...
0
votes
1answer
17 views

automatically launch/open a file when it changes

OS: OS X Lion Shell: zsh I'd like to automatically launch/open a file when it changes. Background: i'm working on a windows vm, generating pdfs. Syncing via dropbox and when a file changes on ...
0
votes
1answer
98 views

mac osx script - find mounted disc with name, copy file from desktop to it, when copy complete, unmount disc

Is there some kind of mac script which finds a newly mounted disc drive that has the name 'EXAMPLE', then copies a file/folder to it and safely ejects the disc when copy has finished? I don't mind if ...
0
votes
0answers
34 views

Making the 'script' log pretty [duplicate]

I often use the 'script' command in the terminal (on OSX) to keep a note of what I'm doing. However the script files generally look like: Script started on Wed Oct 2 11:12:24 2013 ...
0
votes
3answers
181 views

Write pipe result to variable

I need to be able to write whether the test for a grep is either TRUE or FALSE to a variable so I can use it later For the following, if I run defaults read com.apple.Finder | grep ...
-1
votes
1answer
89 views

Check folder periodically for changes and run script on OS X? [duplicate]

I have a folder of files. I would like for the system to check this folder every X minutes to see if any of the files have changed and, if so, to then run a script that I've written in python.
1
vote
0answers
147 views

“Script” command in Bash on Mac OSX

quick question regarding the "script" command in Bash on a Mac OSX 10.8.4 system. In any other bash environment on Fedora, CentOS, etc; when I use the script command it just begins recording with no ...
3
votes
2answers
307 views

Change the OSX system language in a script

Manually I just go into the system preferences, change the language ordering, and restart my app so it starts up in the default system language. Then I can run automated tests with the app running in ...
0
votes
1answer
56 views

Multiple commands using a .command script at launch

I'm trying to figure out why this command script isn't working. killall Google\ Chrome; open /Application/Google\ Chrome.app -args --disable-restore-session-state . I am trying to kill any ...
1
vote
1answer
198 views

Bad current working directory for Textmate 2

I'm using TextMate 2.0-alpha.9427 on OS X 10.8.2. Since two days, when I run a script (Python or shell script), instead of the directory of the script itself, the current working directory is ...
3
votes
3answers
1k views

Run python script from Finder rather than edit?

Max OS X. When I double-click on a python script it opens in the default editor. How might I make it so that when I double-click, or choose the script from Applications, it executes from the python ...
2
votes
1answer
557 views

What scripting/programming languages are default on Mac OSX?

I was wondering what programming or scripting languages come pre-installed on OSX? Particularly programs that can be run from the command line. I'm planning on parsing some CSS, and outputting an ...
4
votes
2answers
1k views

How can I tell if OS X is connected to a VPN network from the command line?

How can I tell if OS X is connected to a VPN network from the command line? By running ifconfig without any arguments when I am connected, I see that there is a utun0 interface which appears to be ...
0
votes
1answer
351 views

Remove all user folders except one on reboot

On a Mac, how can I create a script to automatically remove all user profile folders except a specific one on a reboot?
1
vote
0answers
63 views

allowing timeouts for commands that have no timeout option, where `IFS=$'\n'`

In the lines below, which I added to my copy of Apple's sysdiagnose script: wherever a timeout is already scripted, it is effective I must add timeouts in two areas, but I don't know how to do so. ...
1
vote
0answers
264 views

Accessing a Time Capsule manually via terminal using iCloud credentials

I'm assuming that the task noted above should be possible, as the task doesn't seem like it should be far different from accessing a Mac computer via SSH or through Go -> Connect to Server on OSX. The ...
1
vote
1answer
152 views

How would one pause a copy action when the internet or location disconnects. Shell

Okay. So I have a few executable .sh files that backup a directory. In this case, the Development directory. I have two computers. A Mac (Which is the main computer, and a Windows 7 desktop.) Since my ...
0
votes
2answers
103 views

Scripting a sequential workflow in OSX

I currently have a workflow which relies on several bash commands sequentially in the OSX terminal. It is basically a process which starts with a file x.csv, it does an operation on it and generates ...
0
votes
0answers
493 views

OSX AppleScript mount SMB Share using the Guest user

How do I mount a SMB share using the guest user? I know how to do it with an AFP share: mount volume "afp://;AUTH=NO%20USER%20AUTHENT@NAS_AB01(AFP)._afpovertcp._tcp.local/Images" How do you do it ...
0
votes
1answer
252 views

Send emails in a non-interactive way in OS X

I am using Mail.app in OS X 10.7. In a text file I have a list with 500 different email addresses, extracted from my address book, each one in a different line. I would like to send some christmas. ...
3
votes
2answers
330 views

Bash autocomplete for different directories

I've played with bash autocomplete now for a while, but couldn't find a solution for my problem. I have a project directory with subfolders like this: projects/ruby/project1 projects/ruby/project2 ...
0
votes
1answer
527 views

How do I create a “here document” within a shell function?

I'm working my way through William Shotts Jr.'s great The Linux Command Line on my Mac OSX 10.7.5 system. 90% of the linux that Shotts covers is close enough to Darwin that I can figure out or GTEM to ...
0
votes
1answer
103 views

function works from command line but not from within script

I've got a shell script file that launches a ruby dev server and sets the title of the window. For some reason it's not working in OS X but it worked in Ubuntu. Here's my script: [10:24:48] ...
3
votes
1answer
2k views

How can I execute a script each time I log in and out from OS X?

What I want is to send a URL with variables to a server which will track when someone is present based on when they login and logout of their workstation. I've tried setting the LoginHook in ...
1
vote
1answer
196 views

How to lock OS X after autologin with a script

I want to lock my Mac running OS X 10.8 after it has powered up with a script. I have autologin enabled.
1
vote
1answer
358 views

Mount network volume from script

I have a script that reads data from /Volumes/somenetworkdir/... Each time run it, I have to open Finder and navigate to the relevant network share in order to make OSX mount the volume. Is there a ...
0
votes
2answers
351 views

How can I write a startup script for OSX?

I'm unfamiliar with how this works with OSX. I just want a script to run whenever the OS loads up. Simple script to restart my servers via python. There's about 4 of them. So how do I run commands ...
1
vote
1answer
567 views

Run mono application without terminal window?

Is it possible to run a mono application without having the terminal window open? I am trying to run KeePass 2.1.9 using mono on OS X Lion, and it does run fine. The problem is that it has the ...
1
vote
2answers
564 views

How to automatically change file names for all file added to a directory?

I've created a folder in dropbox for all my screenshots, and redirected all my screenshots there. However the default screenshots file name are long (it contains a time stamp and I don't see how to ...
1
vote
1answer
39 views

compile command executed inside script gives error, executed outside is fine…might be gcc

I have a script called buildgcc.sh with the following contents. mymac$more buildgcc.sh g++ -Wno-write-strings A.cpp B.cpp B.cpp c.cpp D.cpp E.cpp F.cpp artgdg.cpp G.cpp H.cpp I.cpp J.cpp K.cpp L.cpp ...
0
votes
1answer
227 views

Photoshop action to set marquee width and height

For iPhone and iPad screenshots, I like to crop out the status bar. I can never remember the exact pixel dimensions to enter into the marquee tool and when I do find out, it's fiddly to enter it. Is ...
0
votes
0answers
141 views

How can I have Photoshop start and run an action on Mac OS X?

I have an action I've created, and it is listed in my action palette: The action takes the image on the clipboard and saves it to a file. How can I start Photoshop and run that action from the ...
4
votes
1answer
3k views

Shell script - bad interpreter: Operation not permitted

I put the below script in a file called "volume", and put that file in a folder within $PATH. I can execute it fine by "bash thatpath/volume 10" but when I try to execute it using just "volume 10" ...
3
votes
2answers
3k views

How can you automatically run a script after connecting to a VPN on OS X?

I have configured the VPN connection in OS X 10.7.3, but since the network I'm connecting to uses a corporate proxy, has custom Maven repository servers, and other network-specific settings (remote ...
1
vote
0answers
1k views

Macintosh OS X Logout Script

I am working on a project where I need to implement a logout script on some Macintosh computers. I have read the following Create a logoff script/task for Mac OS X article and found that while it is ...
-1
votes
1answer
258 views

How to pass multiple commandline arguments to a script?

I have a command line script that takes images as arguments. I got it working with one argument but fail to figure out how to pass in multiple.
0
votes
1answer
525 views

Script to search for highlighted text

I'm looking for a script (or Launchbar action, or an application) which will take the highlighted text from the front window of any application and send it to my default browser to search in Google. ...
4
votes
1answer
957 views

Using launchd to kill and restart Finder in OS X

I'm trying to use a launchagent on login to kill the Finder, and then re-launch TotalFinder, to automatically apply the colorsidebar mod for OS X 10.7 (the mod can be found here). If I use the ...
4
votes
3answers
12k views

Does anyone have a Mac Terminal script to remove hidden files?

My car stereo can play music from USB flash drives, so I asked about copying MP3s from an iTunes playlist. That worked fine, but my stereo wouldn't play the MP3 files. I eventually put the flash ...
0
votes
2answers
1k views

Can't run PHP executable script. OS X 10.6

Execting php-scripts from the command line now does not work. When executing a script starting with #!/usr/bin/env php. I get this error message: env: php: No such file or directory. So it seems ...
0
votes
2answers
320 views

Writing script for mac (scp alias with default params)

I have got to write this lines often: # from project1 dir scp app/models/user.rb root@mydomain.com:/var/www/project1/app/models # from project2 dir scp app/views/posts/index.html.erb ...