AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

1
vote
1answer
284 views

Sorting Files into Subfolders based on EXIF Date

I have a huge directory from a HDD recovery that contains 70000+ JPEG files. I tried playing around with some AppleScripts, that I found, but had no luck. I already installed EXIFtool, which might be ...
3
votes
1answer
5k views

Get path of parent folder of script location : Applescript

Background: I'm trying to write a simple applescript app that will launch a tcl app, but I'm getting stuck on the first part of the script. I need to get the parent folder of the path to the ...
1
vote
1answer
1k views

How to exec command in iTerm 2 from applescript?

Trying to execute a command from applescript. tell application "iTerm 2" make new terminal tell the current terminal activate current session launch session "Default Session" ...
0
votes
1answer
660 views

Reveal in PathFinder/Finder

We are using AppleScript to reveal files from our application in the Finder. If a user has alternatives, e.g., PathFinder, installed as a replacement for Finder, how we can find our what application ...
0
votes
1answer
262 views

Disabling VLC's crash message

I have a Mac Mini running videos on loop to display publicly, which occasionally crashes I think generally when other OSX functions kicking in. I have a script to detect when VLC is not running and ...
0
votes
1answer
98 views

Folder Actions .scpt Not Functioning

I'm trying to use this script with Folder Actions. I've tested for functionality within folder actions by enabling a default script, it works. But this script does not seem to function? on adding ...
-1
votes
2answers
197 views

Change date scheme of file name with script

I have about 8 years of video files on a server for my work. We want to change the files' date schemes from MMDDYY to YYMMDD for organizational purposes. The filename structure is MMDDYY_Filename.xxx. ...
3
votes
2answers
7k views

How do I automate clicking a button in an application's window with AppleScript?

Let's say I want to click a button that appears somewhere within a window, using AppleScript. click button works, but you have to know which button exactly you want to press. For example: Scanning ...
0
votes
2answers
1k views

How can I open a folder in the current finder window?

I know tell application "Finder" to open POSIX file "/folder/path/" will open a new finder window, how can I open a folder in the current finder window?
1
vote
1answer
28 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 ...
1
vote
1answer
193 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
1answer
665 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 ...
3
votes
2answers
580 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 ...
1
vote
1answer
56 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 ...
1
vote
0answers
160 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 ...
0
votes
1answer
376 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 ...
8
votes
7answers
4k views

MacOS X: How to have a handy “Open this folder in iTerm” shortcut?

I think the title states exactly what I want to do. I want a shortcut or even a button within Finder which fires up a new iTerm Tab and changes the location to the location i've open in Finder. Some ...
13
votes
5answers
61k views

Track kids browsing history even when they know how to clear it manually

I have a colleague with two teenage boys (yes, cue cliche's about 'I have this friend see...') He's currently having issues with them browsing pr0n and wants to do a little spying on their browsing ...
1
vote
1answer
229 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.
0
votes
1answer
740 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 "" & ...
0
votes
2answers
1k views

Inserting Keynote slides into a Pages document

I have a number of training documents which are formed from a word processor file and a slideshow. I'd like to be able to keep them together, ideally by inserting the slides from Keynote into Pages. ...
0
votes
1answer
127 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
320 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
3k views

Get parent of folder in AppleScript

I am writing some AppleScript in an Automator workflow, and I need to get the parent folder of a file (or folder) object. I have searched all over for this, and gotten the same answers, which are to ...
0
votes
1answer
369 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
2k 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 ...
0
votes
1answer
145 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 ...
3
votes
3answers
4k views

Switch between Google Chrome Tabs using AppleScript

I was hoping that the following code would do the job, but no cigar: --Only the window is brought into focus tell application "Google Chrome" activate tab 1 of window 1 end tell
0
votes
1answer
3k 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 ...
4
votes
1answer
3k 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
232 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
94 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 ...
1
vote
1answer
379 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
262 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
3answers
2k views

AppleScript to paste clipboard into current application

I thought this would be simple... I want an AppleScript that launches Plain Clip and then pastes the clipboard into the current document where the cursor is. My script launches Plain Clip (a ...
0
votes
1answer
154 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
435 views

AppleScript to logoff Mac user after closing an application?

I've configured a local user account on an iMac (Lion) to immediately launch Firefox to a specific page after logging in – the page contains a survey to be completed by the user. This works fine. ...
2
votes
4answers
373 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 ...
2
votes
2answers
282 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
203 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 ...
0
votes
1answer
247 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
105 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 ...
4
votes
3answers
2k 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 ...
1
vote
1answer
1k 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 ...
5
votes
2answers
1k views

How do I make Mail.app quit after iCal sends an alert?

iCal uses a built in script file to email reminders through Mail.app. It works great, but I don't use Mail.app for my main email account, just for sending calendar notifications. So, Mail.app opens ...
1
vote
1answer
44 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 ...
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 ...
2
votes
1answer
469 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 ...
1
vote
2answers
2k 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
419 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 ...