applescript

GCD and AppleEvents / NSOperationQueue and AppleScript

As i understood, the threads provided by GCD do have a runloop but no source/port. Now i use some of methods that call AppleScripts thru AppleEvents inside an NSOperationQueue. And sometimes my app crashes with following stacktrace. my questions: Usage of AppleScript inside a NSInvocationOperation or NSBlockOperation Usage of AppleE...

Pass the body of an email to AppleScript

I have Mail set up to execute an AppleScript when it receives an email with the subject "AppleScript" and I was wondering how I could pass the body of this email to the script for execution. Thanks in advance! ...

How to manipulate and print a chart in MS Excel from AppleScript?

With an existing chart in a MS Excel for Mac 2008, in AppleScript, I am trying to do two things: Rotate a 3D chart 1° Save the chart as a image (png) From what I've found on the Intertubes, it seems possible. But AppleScript's awkward verbosity and the lack of non-trivial MS Excel AppleScript examples on the web are too much for me ...

Manipulating a NSTextField via AppleScript

A little side project I'm working on is a digital life assistant, much like project JARVIS. What I'm trying to do is speak to my mac, have my words translated to text and then have the text interpreted by my program. Currently, my app is very simple, consisting of a single window containing a single wrapped NSTextView. Using MacSpeech ...

Receiving Text From Another Application

Hi, I'm building some home automation software with Cocoa/Objective-C. The main application will have a minimal GUI and will most likely be represented by a status bar icon only. I'm using proprietary speech-to-text software (MacSpeech Dictate) that takes my voice command and converts it to plain text. I then need to send this plain te...

QuickTimeX in Applescript / Scripting Bridge

I'd like to be able to grab the metadata of the currently playing file in Quicktime X using ScriptingBridge and Ruby, so far I have the following code require 'osx/cocoa' OSX.require_framework 'ScriptingBridge' @app = OSX::SBApplication.applicationWithBundleIdentifier("com.apple.QuickTimePlayerX") @app.documents.each do |movie| # Wh...

Setting the width of a variable in applescript

I am trying to write an apple script that sequentially names my TV shows with "S0XEYY" where YY is a two digit number. I have the following: tell application "iTunes" set p to selection set c to count of p's items set fixed indexing to true repeat with i from 1 to c set t to item i of p ...

reading rss feeds in applescript

how do I read RSS feeds in apple script? I want it to pick and speakout latest news along with reading weather info ...

Applescipt to find events in iCal

Hi, I'm new to the world of Applescript! I'm trying to figure out how to find into a specific calendar events that contains certain words. In particular, I don't know how to make a repeat that find certain word in the calendar's events... Thanks in advance ...

Can AppleScript Do This?

I need to be able to send text from the clipboard to an application I'm writing (in Objective-C) via AppleScript. Obviously I need to make my application scriptable (I'm currently reading the Apple Docs about this) but is this possible/easy-to-implement? ...

Copy file from server share to local folder with Applescript

Hello. I have a folder on a server which is shared with guest access enabled. I want to be able to copy a file from that folder to a local machine with Applescript. So far I have: property source : "server:sharedfolder:file.ext" property destination : "Macintosh HD:Users:User:Documents:Folder" tell application "Finder" copy file "so...

Tell AppleScript to go to a specific window in Excel

I've got a script that pulls information from an Excel(Mac Excel'04) spreadsheet, and processes it through a local database. My problem(which is temporary, pending a dedicated scripting machine w/ Excel '08) is when I need to work on another spreadsheet in Excel. I want to ensure that the AppleScript continues reading data from the cor...

Applescript, basic help please! (Trying to control Elgato EyeTV)

I am very new to applescript and am working based off of a script I received from someone else, but I am having issues changing the channel with an application I created using Interface Builder from XCode for the application EyeTV by Elgato. I keep getting an error saying "command /usr/bin/osacompile failed with exit code 1". I included ...

Pointers to good reference on writing AppleScriptable Cocoa project?

I've got an Objective-C program that I need to make AppleScriptable. I've looked through the Apple references and they're all at exactly the wrong level, either for the applescripter, or too high level, or too low level. Can anyone point me at a good resource for getting started on this? or perhaps a sample project I can poke at? than...

Open URL in new Safari tab with AppleScript

Is it possible to use AppleScript to open a link in a new tab in Safari? Thanks in advance! ...

Cocoa Scripting Bridge and <contents> element

So, the application I'm trying to script has a scripting definition file that includes a <contents> element, which is an "implicitly specified container." The question, how do I get at what's inside this element using Scripting Bridge? Or alternatively, how do I send the Apple Event necessary to retrieve it and then transform what I ge...

Find missing birthdays in Apple Addressbook

I am trying to clean the holes out of my Mac address book. As a first step I want to ask all my friends for their birthday, to be able to congratulate them with cheesy Hallmark cards. I need a "group" in my address book, to mailmerge personalized messages from. This is the Applescript I came up with: tell application "Address Book" ...

Getting the file name of files dropped on the script

...

Mac OS : creating a background periodic simple script

Hi folks ! I have a friend who wants something quite easy : he has a mac, and he would like a very simple script/app that runs in the background. The goal is to replace a file every 5 minutes with one downloaded from the internet. I would also like a menu on the top bar (like the clock on Mac Os, the wifi, the sound, Dropbox,...) What wo...

Creating a variable-speed slideshow based on USB input on OSX.

I have a friend who is trying to put together a geeky little contraption for a wedding, where people can view a slideshow. Neither of us use Macs, nor have programmed for one, but for various reasons it has to run on a Mac. There will be a USB ammeter hooked up to a bike dynamo. What we want is for a slideshow to be run, and advance at ...