applescript

Repeating iCal Events in AppleScript

How do I get all of the dates on which a repeating iCal event occurs in AppleScript? ...

Controlling Instruments using applescript

Hi, Is that possible to control or automate apple’s Instruments through applescript? If Yes, pls let me know its procedure. Thanks in advance. ...

How do I write to a text file using AppleScript?

So, that's it. How can I write to a text file using AppleScript? I've tried googling around, but answers seem to be years old and I'm not really sure what should be the preferred idiom this days. ...

How do you step in/out/over the Xcode debugger via Applescript?

I am developing an iOS application. I spend a lot of time in the simulator and it would be really helpful if I didn't have to switch back to Xcode to access the debuggers step in/out/over/continue controls. Is there a way to do this without Xcode being the application with focus? (I know about the mini debugger, but that doesn't have st...

Terminal Command or Apple Script to run XCode?

Is is possible to make XCode run by executing an AppleScript or some sort of terminal command? Can you pass XCode startup arguments, like a project to open, or to build a project on startup? Edit: Please excuse my laziness, but Apple Script samples are appreciated. ...

How can I edit file metadata in OS X?

Does anyone know if it is possible to directly edit file metadata on OS X. Specifically in perl. The parameter I'm specifically trying to change is kMDItemFSLabel (The color of the file). I've had a search around and I can't seem to find a way to do this without using a module such as Mac::Glue or an external application (Finder). ...

Use Applescript to click context menu item

Hi all, I got trapped in clicking context menu item using Applescript. Although UIElementInspector can get the hierarchies of the right click menu item, there is an error message "... Can't get menu 0 of ..." shown every time I run the Applescript. The script would like: tell application "Finder" to open POSIX file "/Users" tell appli...

Change Default Browser Programmatically Mac OSX

How would you change the default browser programmatically on Mac OSX. For example from safari to chrome, or chrome to firefox? Thanks ...

Applescript activate closed window

Hi, how can I activate an application and make it open the "standard" window as if I would have clicked on the dock icon with applescript? E.g. I am in iTunes, close the window with command-w open another application and then I click on the iTunes dock icon and iTunes becomes the frontmost application and opens up it's "standard" iTune...

Applescript selecting files of a certain extension

My add to itunes script is trying to add files of unsupported types such as jpg/txt/.thumb etc I would like to be a bit more specific with the below code to only select mp3 & m4a tell application "Finder" to set fPaths to paragraphs of ((files of entire contents of iTunesFolder) as Unicode text) repeat with thisFilePath in fPaths ...

Downloading photos from a (USB-connected) iPhone programatically

I'm wondering if it's possible to access the Camera Roll on the iPhone programatically. Some background: I want to basically run a cron job every night that will download all the (preferably new since last time) photos from my iPhone to a folder on my computer. I'm using a Mac, and I'm not terrifically concerned with interoperability — I...

Applescript form in Xcode

I am fairly new with Xcode and Interface builder. I am running into a bit of trouble while trying to make a simple app that will create an email with several properties. All I want it to do is to take the email entered in the form and put it in the "TO:" field. Everything else in my code seems to work fine, it's just getting what is ente...

Mac Automator/AppleScript: Is there a way to refer to Variables within AppleScript?

I've seen a lot of questions about this on the interwebs but no answers. Is there a way to refer to an Automator 'variable' within AppleScript? I'd like to do some string manipulation as part of a workflow. I've worked around this by using Get Variable and passing them into temporary files, but it's kind of ugly. ...

How is it possible to access function of app A from app B

I was wondering if and in how many way an app can access specific funcions of another app. for example open an url in safari/firefox/chrome run a javascript in current browser-tab play/pause itunes rename selected files in Finder I am aware of the existence of applescript but i was wondering if that's the only way i have to int...

Use Automator and Applescript to move files to folders based on File Name

I have a folder which contains the following files: Elephant.19864.archive.other.pdf Elephant.17334.other.something.pdf Turnip.19864.something.knight.pdf Camera.22378.nothing.elf.pdf I want these files moved to the following structure Archive Elephant Elephant.19864.pdf Elephant.17334.pdf Turnip Turnip...

Logging Window Bounds (dimensions) with Appleccript

It's been ages since I've dealt with Applescript, so advanced apologies for screwing up terminology here. Using the following snippet, I can resize a window tell application "BBEdit" activate set the bounds of the first window to {100, 0, 700, 700} end tell I'm interested in using a similar statement to read and then log the...

Applescript scrapping webpage

there is this awesome website called www.engrade.com. You can get your grades from the website when you log in from your various classes. Now, is it possible for an Applescript to parse engrade.com, log in as me, using my username and password, then parse to find my grade? can some one show an example of this? especially logging in. ...

Open link in Firefox via contextual menu using Applescript

I'm new to use Applescript to create services in Snow Leopard. I found myself often trying to open a link in Safari with Firefox. I know there are ways to open a page url with FF but I want to open any link inside a page with FF. I think using Applescript to create a service might be a good idea and so far I found this: openFirefoxURL("...

AppleScript Processing Files in Folders recursively

Hi, I have a root folder and there are sub folders in it. It is generally one level only but it can be deeper. These folders will have different files including some .rar files. I want to create a recursive function which traverses the folders, check if the file is a rar file and open/extract it. The code is working to first level with ...

Using Applescript loop to recursively apply View options

I'm trying to advance an Applescript to set Finder window views - recursively - as many levels deep as there may be in any given folder. I can achieve the desired results but only in one window/folder; despite hours of searching and experimenting I'm still unable to wrap my noob head around Applescript's seemingly simple syntax (vis a vi...