AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

1
vote
1answer
24 views

Register a file specified by open

So I have this small bundle with applescript made, and it even seems to work as it should. However, it appearently doesnt open my files when it is asked to via the open utility. It works though when I ...
0
votes
1answer
309 views

Use Automator for handling multiple file inputs through shell command in OS X

I tried to make an Automator drag and drop application but I'm totally lost. The script should use cat to join multiple audio files together. Steps: Read the selected finder files (which I drop ...
4
votes
3answers
623 views

Logout user script

I am trying to create a script in ARD that will let me logout a user. Now I have a script which does start the logout, but I want it to execute instead of waiting 60 seconds. The script currently ...
0
votes
0answers
29 views

clicking on a menu extra of a 3rd party application using applescript

Is there a way to click on a 3rd party app extra menu status items? This is "TouchlessForMac", an app for LeapMotion. I would like to click on Advanced using applescript.
0
votes
0answers
100 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)? I am newbie when ...
1
vote
0answers
119 views

Applescript app. won't force OSX to connect with VPN on Mac 10.8.4

I set up an applescript application (saved under the name "BTGuard VPN-OSX) to force OSX to connect with my VPN service (BTGuard). I followed instructions from this link ...
3
votes
2answers
301 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 ...
-2
votes
1answer
80 views

Mac always restarting after reboot

I created an AppleScript to restart my Mac: tell application "System Events" restart end tell I put this script into Calendar.app and set it to start at 7.00. When I put script into calendar and ...
1
vote
1answer
177 views

Why does “Terminal” get replaced with “Applet” in AppleScript?

I have a simple AppleScript (packed as an app) that tells the Terminal to execute a couple of lines of code. Every so often -- about once every 7 to 10 days -- after a cold restart, the code has been ...
0
votes
3answers
124 views

Process clipboard content on Mac OS?

I want to see if there is a tool or script available that I can use to modify clipboard content on the fly. Often when I'm writing code, I'd like to take a string of text and make it a slug. Instead ...
0
votes
1answer
218 views

Trying to Use AppleScript to Convert .xls and .xlsx to .txt (Tab Delimited), Needs Fixing

I copied this from an answer I got from another thread. I am trying to convert ~300 .xls and .xlsx files to tab delimited. They are all in the same folder. If anyone knows a better way, please let me ...
0
votes
0answers
43 views

Applescript to change the address of an iTunes streaming file

it's a really really simple concept, I just can't figure out to do it... I'm trying to use Applescript to use iTunes to listen to different files on a site almost like a background radio. To get this ...
0
votes
0answers
108 views

Making Google Chrome bookmarks update/overwrite with page last left off in same domain

I'm wondering if there's a way I can make Google Chrome 'save my progress' through a certain domain, and update with that page to the same bookmark. Just a quick time saver to avoid re-bookmarking, ...
0
votes
1answer
55 views

Setup a Watch Folder over a network

I'm trying to setup a Watch Folder in AppleScript which is over a home network. I want the script to generate an email when a file (or files) is dropped in the Watch Folder. How can I achieve this?
0
votes
1answer
447 views

AppleScript + Quicktime: Start and stop a movie recording and export it to disk

Attempting to start a screen recording, wait a few seconds, stop the recording and export saved recording to disk. Versions AppleScript 2.2.4 QuickTime: 10.2 AppleScript set filePath to "" & ...
1
vote
1answer
45 views

Restarting multiple mac computers with terminal

How do you restart multiple mac computers that are on the same network with terminal? I know the ssh command to login to one computer but I want to be able to send a reboot command to multiple ...
0
votes
1answer
96 views

send applescript a url ,if the url file's extension is “.mov” download it to desktop

I'd like to remote control my mac mini(using as a NAS with Mac OS X 10.8.2 Server)download files from URL. I think applescript can realize it. So I'm puzzled by two problems: 1.How can I send URLs to ...
0
votes
2answers
239 views

Applescript to get name with VLC 2.0 should work but doesn't

I'm trying to get the name of the current file playing in VLC. Applescript SHOULD be able to do this with VLC 2 and on (it's in the dictionary, "name of current item") however it keeps not compiling, ...
3
votes
1answer
195 views

AppleScript based Automator service quite unstable (sometimes very slow, sometimes encounter error)

I have some applescript based Automator services, for instance, Launch Emacs With Selected File: tell application "Finder" set selectedDirectory to (quoted form of POSIX path of (target of window ...
0
votes
1answer
240 views

Applescript to play Windows share (smb://) videos with VLC Player

I'm building a script to automatically run videos held on a windows server using VLC. I can get VLC to play files on my drives, but not from files held on a server. For example: tell application ...
0
votes
2answers
1k views

Can AppleScript/osascript be used to click menu extra menu items?

I have an application installed that only appears in the menu bar (as a menu extra to the right). I would like to click one of the items contained in its menu via osascript. I've found the following ...
1
vote
2answers
137 views

LaunchAgent plist to keep an app running and hiden

I'm using the following script <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist ...
0
votes
1answer
102 views

Applescript to execute script in new terminal window and maintain a reference to that window

How do I use applescript to execute a script in a new terminal window and then close the window? After the line: set x to do script "" Is there a way to get a reference to the window of tab x? A ...
0
votes
3answers
730 views

How to open a new tab in Chrome using AppleScript, only if it doesn't already exist?

I'm trying to write a little AppleScript to make a new tab in Chrome only if it doesn't already exist. I tried the following: if title of tab is not "Gmail" then open location ...
0
votes
1answer
2k views

How can I set a static IP, gateway, net mask, and dns using terminal / applescript - OS X 10.7.5

I use my macbook at home and at work. At work I need to use a static IP, gateway, DNS and net mask. At home I use it in DHCP mode. Manually setting them every day really sucks. How can I set them ...
1
vote
1answer
185 views

OSX script to Check if ffmpeg process has stopped

I have a Automator Workflow that uses Videobox to convert flash videos for multiple devices but cannot tell when it finish a conversion,I know that it uses ffmpeg for its conversion as I can see it in ...
1
vote
1answer
248 views

Applescript to shell script watch folder

I am trying to setup a watch folder so that when a file is added to a folder, I can run a shell script...for this purpose I made a simple test but cannot make it work... Here is my applescript on ...
1
vote
0answers
200 views

Trying to re-direct emails as plain text using Applescript. Code (inside) isn't working, any help would be great

I have users sending mail through Outlook which formats the text as Rich text. I'm trying to create script where a "catch-all" email address intercepts the email, converts it to plain text then send ...
2
votes
1answer
932 views

AppleScript: Open a new window in current space without switching to active window in another space

I want to have an application open a new window in the current space without switching to a space in which a window is already open, but I want to keep the When switching to an application, ...
1
vote
1answer
79 views

Automating steps required to disconnect my laptop form my desk

I have a MacBook Pro, and when on my desk it is connected to a thunderbolt display. And I have an external hard drive connected to my thunderbolt display. This hard drive has 2 partitions and ...
0
votes
1answer
134 views

mount disk with password from applescript

I'm using a applescript to mount my harddrive. At the moment im using: do shell script "diskutil mountDisk diskutil list | grep \"Harddrive\" | grep -o 'disk[0-9]*'" Now i want to do the same but ...
2
votes
2answers
234 views

AppleScript to return recent Finder folders as list

I need to write an AppleScript that will return me a list of the Recent Folders menu in Finder. I don't want an AppleScript that will simply open this menu – I need a script to return the recent ...
1
vote
1answer
168 views

iTerm 2 change row size using AppleScript

I want to change the height of my terminal window using a script. Currently this is what I have come up with: tell application "iTerm" activate tell the current terminal tell the ...
3
votes
1answer
2k views

How do I close a window from an application, passing the file name?

I’m trying to produce an Applescript-based shell command that tells the Preview application from Mac OS X to close a particular window. #!/bin/sh osascript <<EOF tell application "Preview" ...
0
votes
1answer
219 views

Applescript in Automator to Service

I'm trying to do this very simple Applescript for text manipulation. It runs from the service menu, in some applications. Questions: What's wrong with my script? Sometimes it shows up in the ...
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 ...
3
votes
3answers
1k views

Quotes within quotes applescript

I am doing an applescript that is supposed to set an command with quotes an varible. This is the code so far: set myString to "This is a "quoted" text." But an error occurs because applescript ...
0
votes
1answer
597 views

Only get the size from “du” command, not the folder names

I am doing an applescript that is supposed to set the size of an folder to an varible. This is the code so far: set sizeVar to do shell script "du -skh -m /Users/JS_Admin/Desktop" Output: "4242 ...
2
votes
4answers
303 views

How can Automator or Applescript rotate 500,000 images in folders and subfolders?

I have very specific question. I've got 500,000 images that sit in 98 subfolders. Some of the subfolders contain 25,000 images. Is there any script/automator workflow that I can use? I was trying ...
1
vote
1answer
41 views

I would like to know if someone has applescript to loop al my stickynotes and put it in a textfile

I have been meaning to do this for a while, but I never got around to do it. The problem is that I have to do research how applescript works. Anyway, I have now collected over 200 snippets for my ...
0
votes
3answers
639 views

AppleScript: how do I store folders' pathnames into an array, replacing spaces with “\ ”?

I have a folder and inside this folder there's a bunch of subfolders. Using AppleScript I wish to store the pathnames of these subfolders into an array. Here's my problem: each pathname containing " ...
2
votes
1answer
2k views

Use Automator to open shell script, see output in terminal

I have a fun little problem, running on Mac OS X 10.8 Mountain Lion. I have a script (WebKit's run-safari) which launches Safari in dev mode (it sets some environmental variables and then runs arch ...
1
vote
1answer
1k views

Pass arguments to osascript via shell function in OS X Mountain Lion

The answer in How to open a new Firefox window with URL argument is broken in Mac OSX Mountain Lion (10.8.2). I can't comment on that answer or question, so I had to create a new question. It fails ...
2
votes
1answer
382 views

Can I use applescript to click buttons in background?

Sorry for this generic and probably bad-written question. I've never programmed in applescript, but I'm quite familiar with other coding language. I'm in the need of clicking on 2 sequential button ...
4
votes
1answer
2k views

Creating “save as” functionality to .eml file in AppleScript

I'm new to AppleScript and trying to figure out how to save a Mail.app message as an .eml message. Ideally, I would like it to act similar to the Mail menu bar actions, in which it saves the message ...
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.
2
votes
1answer
129 views

How to get which file is requested to open using a mac application?

I have created a mac application which can be open my file extensions. But when I tested it, I dont get the path of the file requested to open using the application, instead I got the "psn_0_151589". ...
1
vote
2answers
909 views

Close all Mac Terminal windows, but the one running a script

I am trying to create a shell script that runs a python simulation programing in 4 terminal windows. I have the script that launches the program four times in four separate terminal windows(total of ...
2
votes
1answer
333 views

Applescript Woefully Slow Finder.app Set Comment

This is the script: set d to do shell script "date +%d-%m-%Y" tell application "Finder" set dir to POSIX file ("/Volumes/Xsan/PathTo/Folder") as alias repeat with f in entire contents of ...
0
votes
1answer
284 views

How to applescript the 'grab' application

I am trying to write an apple script to use the "Grab" application in the Utilities folder to capture and print an application's window. I can get to the part where I tell Grab to start window ...