AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

0
votes
0answers
35 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
91 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
51 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
0answers
26 views

Reading Date & Time values set by user in System preference using apple script

I want to use apple script to read values from Date & Time of system preference. I want to read Show AM/PM and other checkbox values weather they are selected or not?? I tried the following script ...
0
votes
1answer
364 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
1answer
40 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
0answers
46 views

Custom buttons in Mac Excel 2008

In Microsoft Office Excel for Windows there is a capability to create buttons and attach VBA code to them to make Excel do things like calculations and copying from one cell to another on click. Is ...
0
votes
1answer
86 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
219 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, ...
0
votes
0answers
34 views

Warning when sending from a secondary email account in mail.app

With multiple email accounts in Apple Mail (Mail.app) on Snow Leopard a new message will be from the account I am currently viewing by default. I would like to have a warning pop up if sending from a ...
3
votes
1answer
159 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
204 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
104 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
91 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
523 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
0answers
131 views

Apple script/app to give me a reminder when I shut down

I have two network drives which I leave running for backups - they are a bit sensitive to being simply powered off - I need to log in to the drive and tell it to shut down first. Sometimes I shut down ...
0
votes
1answer
1k 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
168 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
216 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
171 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
706 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
76 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
129 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
212 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
152 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 ...
2
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
210 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
98 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
863 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
421 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
272 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
38 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
594 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
1k 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
337 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
188 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
113 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
764 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
304 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
256 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 ...
2
votes
0answers
82 views

Applescript Adobe Updater

So, I am new to Applescript editor and I am trying to write code to automatically update computers. For some odd reason I can not seem to get Adobe to update successfully. I tried using Accessibility ...
5
votes
2answers
3k views

Make AppleScript wait for an Application to finish loading

I have an applescript to initiate my work environment, but have a small quibble with it. I want the script to launch several programs, and then hide them, once they started. The code looks like this ...
3
votes
0answers
479 views

Applescript to connect to bluetooth device

I'm trying to create an applescript to allow me to connect to a bluetooth device by it's Bluetooth ID. So far, i've managed to get an applescript to turn on bluetooth if it's off. Here's the code: ...
2
votes
2answers
2k views

Open new terminal tab and execute script

I need to merge two osascript scripts, so that with one command I can open a new terminal tab and execute a script like echo hello into that new tab. This one opens a new terminal tab. osascript -e ...
0
votes
1answer
441 views

Automating tasks in OSX like VPN Connection?

I am using my school's VPN service to surf on netflix. I have to connect to the VPN most of the time. My school uses Cisco AnyConnect Secure Mobility Client. I have to enter password and accept a ...
2
votes
2answers
370 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. ...
1
vote
1answer
2k views

How can I launch Finder in a specific directory, from Automator or AppleScript?

I'm trying to assign a global keyboard shortcut that will launch a new window of Finder, in a specific directory. I can write a script that'll open a new Finder, but not sure how to make it open in a ...