applescript

AppleScript Transmit Script for uploading file to replace itself on web server

So I have this idea for a handy little AppleScript which in my opinion would be very handy in speeding up the process of uploading a local file, to its same location on the server. In other words, you have to specify the home folder on the server and locally, but once that's finished, it would be nice to just press like "Command" + "Shi...

Programming an iTunes script for converting a playlist...

I have a gigantic playlist (around 2000 songs) in iTunes that I would like to convert to 320 kbps MP3 (from low-quality AAC). What I want to do is convert all the songs in the playlist, delete the low-quality originals, and then re-import the songs into the playlist (as iTunes recognizes the converted songs as new songs and the deleted o...

Get Photoshop's action list using Objective-C

I'm writing an application for OSX using C++ and Obj-C that interacts with Photoshop. I've been using NSAppleScript with dynamically built AppleScripts to drive Photoshop (yes, it's a little scary...) I would love to be able to drive Photoshop a different way, so if anyone knows a better way, I'm open to it! Unfortunately, I can't use S...

Toggle Web Sharing

I'm looking for an Applescript to toggle Web Sharing in Snow Leopard. I tried this but it doesn't disable, just restarts it when I run it again. Or a shell command as long as I can turn it into a Quicksilver action. That's my end goal. Thanks so much! ...

AppleScript to Intercept Outgoing Mail from Mail.app

Hi, I'm trying to write an AppleScript to intercept outgoing mail messages from Mail.app. I want to check that, if I'm sending a message to work colleagues (who're in my Work address book group) that I'm using my work account. Otherwise, my threads get all messed up when people reply to the wrong address, etc. There are two parts to m...

How can one invoke a keyboard shortcut from within an AppleScript?

I need to invoke a keyboard shortcut from within an AppleScript code, e.g. Cmd+Ctrl+Opt+E. ...

How do I remove a build configuration from an Xcode project from a script?

I'm currently using AppleScript to clean up an Xcode project. I'd like my script to remove some build configurations that won't be relevant to other developers on my team. For example, if I have "Debug", "DebugTest", and "Release", I would like the script to remove "DebugTest". I'm currently using the following script: tell applicatio...

Making a another applications's window frontmost and focused

I've been trying to get any given window from another Application to become front most and focused. Here are the two methods I have tried: AppleScript tell application "Safari" set index of window "Downloads" to 1 activate end tell Why it doesn't work: While it seems to change the z-Order, it doesn't change the focus! The prev...

How to automate XCode project alterations?

I have a tedious task that I need to repeat every time I build my iPhone project for sending to non-programmer colleagues: all libraries and headers that I reference outside the project's folder need to be copied into the project folder or a subfolder thereof, so I can zip up the source and pass it on. I'm aware that you can automate XC...

How to make an executable program from AppleScript

In order to run my AppleScript program I have to open it up and select "run." I want the program to just run when I click on it. I tried to compile it, but it didn't seem to make a difference or create a new file. ...

How do I write Applescript that will give me an hourly popup alert

I am wondering how to have a popup alert on my computer (Mac OS X) every hour. I figured writing this in Applescript would be pretty simple but I have no Applescript experience. Thanks ...

AppleScript code to loop messages in Entourage and delete them

Hi Guys, I wrote a simple AppleScript which loops indefinitely inside Entourage Inbox and gets subjects of "unread" messages: tell application "Microsoft Entourage" activate repeat with eachMsg in messages of folder named "Inbox" if read status of eachMsg is untouched then set messageSubject to subject of eachMsg as string...

How to locate an image on the screen with AppleScript

When a certain image of a button popups up, I want to click that image. How can this be done with AppleScript? ...

How to delete /* and */ quickly in XCode

In XCode there are some useful functions commented out with /* and a corresponding */. Is there a shortcut that will quickly remove these? Can a shortcut be made using AppleScript, or is there a better way? ...

How do you add an item to dictionary with a variable for a key name?

I am trying to write a script that will add a new key to a dictionary plist. The script works fine when using a string for the key of the dictionary but I can't seem to figure out how to use a variable for the keyname. The script is below and is almost working. THe only issue is being able to use keyName as a variable instead of a str...

Translate Applescrip [key code 125 using command down] to appscript

Hi, how to translate the following Applescript to appscript: tell application "System Events" key code 0 using command down end tell I want to perform "Command + A"-like short cut, i.e., select all texts. ...

AppleScript vs. AutoIt

I get the sense that AppleScript is more respected than AutoIt. I think that it's something you can put on your resume whereas AutoIt is not. Is that the case? Why is that? With AutoIt you can automate just about anything. Is that the case with AppleScript? With AppleScript can you make it detect arbitrary images on the screen like image...

Does AppleScript have image recognition like AutoIt or AutoHotkey

In AutoHotkey and AutoIt the script is able to recognize images on webpages. Can AppleScript do that? How? ...

Scheme instead of Applescript?

Can I use Scheme instead of Applescript on the Mac to automate apps such as iTunes, iCal, Mail, etc.? ...

How to check value pasted to clipboard with AppleScript

Hey guys! I'm an AppleScript noob, and I really want to do something nice with it. How can I make an AppleScript that runs at all times checking for clipboard changes? What I want to do is check the clipboard, see if it's a certain value, and make a web request with that clipboard value. This is what I currently have, it just gets the ...