1
vote
0answers
7 views

How do I Launch an Applescript with a Hotkey Without Automator?

I'm running Yosemite and looking to launch Terminal with a keypress in any application. One solution was creating a Service in Automator that launched terminal and assigning a key to it in System ...
1
vote
1answer
43 views

How to programmatically get the path to the wallpaper on the active desktop?

I'm trying to get the path to the wallpaper in the active desktop. However, I'm having trouble reliably getting this. The following sources indicate that ~/Library/Application ...
2
votes
0answers
13 views

Tmux hampers osascripts display notification

I like to show notifications from scripts using osascript -e 'display notification "Some text"'. This works fine from the plain shell but it stop working when in tmux. It just doesn't show the ...
1
vote
0answers
25 views

Click in finder vs “open -a” on command line

I have a file type (.mxl -- compressed MusicXML) which if I double click in Finder opens properly in my .mxl reader (Finale 2014.app) but which if I call "open file.mxl" or "open -a ...
0
votes
0answers
13 views

Run kinit as AppleScript promting for network username and password

I need to develop a small app (currently using AppleScript to do it) that I can send to users to run a "kinit" shell script command. This is on machines that are not bound to the domain, but needs to ...
0
votes
1answer
15 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
1answer
77 views

How to trigger Notification Centre notification from JavaScript? [closed]

The other question asks the same but using AppleScript. Apple introduced JavaScript as a new language for Automation in OS X 10.10.
0
votes
1answer
93 views

Applescript Invoke Specific User and Password

I have a do shell script that I need to run in Applescript, but it needs to run as a different user. It is to be deployed into the student's network drive as a standalone application that the students ...
1
vote
1answer
65 views

Difference between variable and pipe to shell in applescript

In answering this question I wrote this script: global presenterNotes tell application "Keynote" activate open (choose file) tell front document set presenterNotes to presenter ...
1
vote
2answers
125 views

Open an new Safari window on the current space from the Termial shell with multiple tabs (URLs)

How to open an new Safari window from the Termial shell on the current space? Now when using the open http://example.com it got opened the URL as last TAB on my 1st safari window. I'm looking for ...
0
votes
2answers
43 views

Geeklet script to ping hosts

I have found the nice script below to ping a host to check if it is up or down. However I haven't found a way (and my very basic programming knowledge has failed me here) on how I can ping multiple ...
0
votes
2answers
46 views

I want to show a file in an AppleScript bundle, but shell returns: file not found

My Bundle File: reference.txt My Code: set bashFile to path to resource "reference.txt" set the reference_data to do shell script "type " & quoted form of (POSIX path of bashFile) display ...
0
votes
2answers
48 views

Set Alias for Terminal Window in Applescript

After opening multiple terminal windows and running commands in them, it becomes difficult to send another command to a specific terminal window. How can we set an alias for each terminal window so ...
0
votes
1answer
80 views

Applescript System Events Keystroke broken after 10.9.4

It seems like the recent Mavericks update has broken the keystroke command in applescript -- whenever my script reaches that point, it freezes. (I currently have ~20 zombie osascript processes...) ...
0
votes
1answer
33 views

Creating a script that will execute a program and if it exits without crashing, will run it again

I've already asked this question in the UNIx exchange but I was told to ask here also about AppleScripts if the standard shell does not work. I require a script that will open an application. Wait ...
0
votes
1answer
53 views

How to download images from an xml feed using terminal?

How can I download png images from an xml feed that looks the following way? <ListBucketResult xmlns="http://url1.com"> <Name>imagesToUse</Name> <Prefix/> <Marker/> ...
0
votes
1answer
110 views

Applescript Command as Specified User to Delete All Files in a Particular Folder

I am looking at using the POSIX path to delete the contents of a particular folder on users computers but it must be performed as a particular user. I can deploy the script silently from my side ...
0
votes
1answer
79 views

How do I get system_profiler output from a lot of machines in a network?

I need to have a script that will execute "system_profiler -detailLevel full" command in a remote mac machine. While this is going on, the user on the remote machine should not know that there is ...
1
vote
1answer
258 views

ffmpeg working from command line in Terminal but not in an Automator shell script!

I have just compiled my own copy of ffmpeg on my system and it's located in the following path: /opt/local/bin/ffmpeg When I run the following command in Terminal.app, it runs smooth: ffmpeg -i ...
2
votes
2answers
1k views

Passing a password to an Automator application

I have written an Automator application with the following shell script to open an FTP connection on my system: sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist osascript -e 'tell ...
4
votes
2answers
548 views

Automating ffmpeg using Automator Service

I often use ffmpeg off the command line to convert video files into mp4 on my Mac (running Mavericks). Do note, however, that I am NOT re-encoding my videos; am just changing the container from an avi ...
2
votes
4answers
953 views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
1
vote
1answer
1k 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 ...
1
vote
1answer
209 views

How do I get osascript to parse backslashes and run this command in a new Terminal window?

Here's a command that works fine when I paste it into the Mac Terminal window: echo -n -e \\033]0\;My Custom Window Title Here\\007 ; ping www.google.com In particular, it sets the Terminal's title ...
3
votes
1answer
836 views

enabling/disabling internet sharing with terminal in mac osx 10.9.2

Very much on the line of already existing questions, but not having enough reputation to comment by following existing threads, I can only ask my own, at the risk of duplicating may be, certainly ...
1
vote
1answer
28 views

Droplet Applescript Touch

i was trying the last days to get a droplet working, which is changing the time stamp of every dropped .jpg / .tif / .dsc / .cr2 to the actual time or even a few secs earlier in Terminal. Would ...
1
vote
2answers
963 views

What is the Mac equivalent of Windows “start” command?

I'm creating a script that runs several other scripts. I need them to all start up in their own process (read window) so I can review the output of each, but I also need them to run in parallel, so ...
2
votes
1answer
55 views

String of variable has a space - how do I escape spaces?

I'm working on an applescript that pulls old Time Machine backups and places them into a new folder. But if the old computer name has a space in it, that causes an issue in the do shell script ...
3
votes
4answers
362 views

AppleScript: Press Enter Every X minutes If Terminal is Open and Application Has Been Idle for X Minutes

I am new to AppleScript and am attempting to use it. If I am using Terminal and if I have not pressed a key for x minutes I want my Mac to press the return key. It is to repeat this process every y ...
1
vote
2answers
654 views

Opening new Terminal.app window/tab with a certain profile from command-line or AppleScript?

When I login to my Mac, I want to automatically open a new Terminal.app window with a certain profile, say Monitor, that has a startup command and several appearance settings. I thought it would be ...
1
vote
1answer
47 views

How do I tell AppleScript to read the contents of the “Network” Finder window?

I'd like to be able to get the contents of Finder's "Network" folder (Menubar-->Go-->Network). The folder contents here is different than /Network or /net. The overall goal is to grep the names in ...
0
votes
3answers
526 views

Applescript - Unable to find resource when inside application

I have a regular Applescript application bundle that executes an applescript file when it's run. I'm trying to run a shell file that is located at "/Contents/Resources/Data/df.sh", however with the ...
1
vote
1answer
50 views

How to script a logout while screen is locked?

I want to log out a user via a shell script, after a delay. However, there's a few other issues: User does not have admin and/or root. Logout must complete even if screen is locked. Currently, I'm ...
1
vote
1answer
85 views

How to create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)

I need to create an apple script to perform DD Commands in sequence, to replicate the same .img file to multiple USB flash drives The context: the computer is connected to a powered USB hub with 7 ...
0
votes
2answers
71 views

Universal path in Terminal

I'm writing an AppleScript that will allow me to copy the Time Machine folder from an external drive and paste it onto the user's desktop of their Mac. The reason I'm doing this is because when a time ...
0
votes
0answers
105 views

move a file, replacing existing (if any), ideally by putting existing in the trash

I am trying to find a way to automatically (without user intervention) move a file from A to B, replacing B if it exists, ideally by putting the existing copy of B into the appropriate Trash folder. ...
3
votes
1answer
1k views

Show Results of Automator-Terminal command

TL;DR If I create a .app via Automator, how can I show results of a shell script in a dialog or terminal window? I am using Automator to run a shell script adb install /Directory/$1.apk and if I ...
2
votes
2answers
270 views

Terminal.app equivalent of `xterm -e 'cmd'`

With xterm (and gnome-terminal, terminator, etc), you can run the following command: $ xterm -e 'vim somefile.txt' xterm will open and run the specified program (in this case, Vim). When the ...
2
votes
1answer
140 views

How can I rename an ordered list of files with an ordered list of file names?

I have a series of files. I need to apply a series of file names. So, 001.jpg -> apple.jpg 002.jpg -> banana.jpg 003.jpg -> orange.jpg etc. I will have to repeat this for each of 16 folders with ...
8
votes
2answers
203 views

How would I go about making a stand alone app on my dock to open a game using a terminal command?

I have a game that they never released for mac, and I installed the game using WINE, the install itself was flawless, but every time I want to play it, I'm forced to open Terminal and run cd ...
3
votes
2answers
2k views

Allow application to control computer (assistive devices) on Mavericks via Terminal?

I'm currently working on automated instalation of Mavericks 10.9. I have NetBoot set up. Everything works OK untill I want to execute Applescript. Since the release of new version I need to manually ...
9
votes
2answers
7k views

Run AppleScript from bash script

If I wanted to run an AppleScript from within a bash script I could call a file with the list of commands that I require to execute. #!/bin/bash {some commands} osascript file.scpt {other commands} ...
4
votes
2answers
821 views

Bash Script that will start up second Terminal process?

I need a script that will be able to fire up a second Terminal instance and pass a command directly to that one whilst it continues it's own executions. It's to start up Python script that will host ...
0
votes
1answer
63 views

How can I make a .command file that I can share without giving permissions on each computer?

I have a terminal command that I would like to run. telnet 169.254.216.127 54326 Ideally I would like to convert this into a .command file and be able to share it with many other mac users ...
2
votes
1answer
358 views

Launch Dictation With Applescript

I would have thought this would be easy to find, but thus far it has not been for me. Is there a way to launch dictation (fn, fn) with applescript or from the terminal?
4
votes
1answer
310 views

Printer Deploy with and custom preset profiles to Mac OS X workstations

How would I go about deploying a network printer (Sharp MX-2600N) to Mac OS X machines that would include a custom printer preset profile (Embedded Printer User Authentication Code)? Ideal Method of ...
1
vote
0answers
50 views

Is there another way apart from screencapture to take a screenshot of a background window?

I'd like to take a screenshot of a background window given its title. I know this can be made with screencapture -l idwindow output but unluckily I can't use this method because I'm on a 10.5.8 ...
3
votes
1answer
119 views

Running an AS droplet from Terminal

I have an Applescript Droplet application that I need to run from terminal. I can use osascript or even just open to open the AS App, but that will run its on run handler, not the on open droplet ...
1
vote
1answer
121 views

System event key codes not working on thunderbolt display

My AppleScript works when I am just using my MacBook Pro Retina, however if i have my Thunderbolt Display attached the script does not work. Here is the script which works perfectly on just the ...
2
votes
1answer
1k views

Set size of window to exact pixels, and place via x, y coordinates

I would like to create a tool that allows you to set windows to exact sizes on the pixel scale to be able to have more precise screen divisions. For example, if I had four Terminal windows (and I ...