AppleScript is a proprietary programming language in Mac OS X to control and exchange data with applications.

learn more… | top users | synonyms (3)

2
votes
1answer
48 views

How to test if video is local or stream?

If I watch a video in QuickTime Player, how I can test in my AppleScript, if this video file is on my Mac or is it streamed live from the net?
3
votes
1answer
1k views

System-Preferences Applescript using osascript cannot select its window

This AppleScript (based on an answer in a MacWorld form) will tell me whether or not Screen Sharing is enabled: tell application "System Preferences" reveal pane "com.apple.preferences.sharing" ...
0
votes
0answers
10 views

How to test if video is local or streamed from net? [duplicate]

If i watch video in QuickTime Player, how i can test in my AppleScript, is this video file in my Mac or is it streamed live from net? Anybody know address of QuickTime live streams i could use when ...
0
votes
1answer
46 views

script to cycle through multiple pdfs and want to close the windows

Hey everyone I am new to applescripting. I have a need for an applescript that will cycle through 3 PDFs, located out on a share drive. I have the script but the problem is that if a user overwrites ...
-2
votes
1answer
3k views

How to configure Automator to log into a website, each time generating a new random UID and email address?

I need to find a way to log into a company intranet site multiple times in quick succession on OS X 10.8.2, each time with a new completely random user ID and email address. The website only requires ...
4
votes
1answer
1k views

How to use environment variables in applescript

I'd like to use my environment variables, which were defined in my environment.plist file, in my applescript. How do I do that, for instance: log "Glassfish Home: " & AS_HOME Where AS_HOME is ...
2
votes
3answers
422 views

How can I set up a shell script as a wrapper to the main executable of an app?

I have an application that I want to launch via a shell script that does some setup and then launches the app itself with some specific options. Ideally, this script would be run whenever the ...
1
vote
1answer
455 views

Applescript to get Dropbox file direct/share link

Is it possible to retrieve the direct/share link of a file that is in my Dropbox folder, but not in its Public subfolder? I'd like to use that for an Alfred workflow. I saw many tutorials on how to ...
0
votes
1answer
315 views

apple tv ssh script automation

I have a Apple TV 2nd generation that is jailbroken and I run xbmc on it. At times it gets hung or freezes up. At that point, I open up the terminal on my macbook and run this script. ssh ...
0
votes
1answer
254 views

make applescript close keynote after presentation is over

does anyone know how i would achieve the following? i want to make applescript close Keynote AFTER the slideshow is finished. any idea? mybe via the class "playing" in keynotes application properties? ...
1
vote
1answer
678 views

How to create an apple script that forwards a flagged email

I want to create an apple script that will forward a flagged email to x@mail.asana.com I have tried this script: on run tell application "Mail" repeat with _acct in imap accounts ...
5
votes
3answers
5k views

How can I stream audio to multiple computers at the same time?

I'm trying to stream music to different computer's speakers simultaneously. Currently I'm doing this by physically timing the start of the song on each computer. Are there any built in utilities or ...
0
votes
0answers
281 views

AppleScript works fine in 10.8 but not in 10.7

I have a simple AppleScript that works perfectly on two ML machines (10.8.3), but when I try to run it on a 10.7.5 machine it doesn't work. To make matters more confusing, in 10.7.5 it runs in the ...
0
votes
1answer
105 views

In applescript how do i get two different things to repeat at the same time

I am trying to get two different actions to repeat at different intervals but right now only the first action will repeat. repeat keystroke "i" delay 44 end repeat repeat ...
1
vote
0answers
57 views

Ruby and osx, clipboard status detection

My question: is it possible to detect when clipboard was pasted into other app ? With use of RubyMotion, Macruby, or Apple Scripts maybe ?
0
votes
1answer
94 views

Any way to add Lion full-screen feature for TaskPaper by AppleScript?

I am using TaskPaper and, unlike most Mountain Lion apps, it appears that there is no way to make it go full screen. Would it be possible to use an AppleScript to make it go full screen in the same ...
1
vote
2answers
3k views

Can AppleScript automatically press a key for me in an application?

I'm trying to devices an AppleScript that will automatically press the right arrow key for 1 second, then the left arrow key for 1 second and repeat this in an endless loop until I interrupt it. Here ...
0
votes
2answers
1k views

Compress files with the output name same as Parent Folder with Automator

I've been searching the internet for a solution to this. I would like to create an Automator workflow that will zip the selected files, name the zip the name of the Parent directory and save that zip ...
0
votes
1answer
454 views

how to auto download a certain attachment in mail

I have looked on stack exchange and other sites for a simple applescript. I have found more complex scripts that it's hard for me to understand (not knowing a lot about the applescript syntax). So, ...
-1
votes
1answer
63 views

Can Applescript ask for the names of the people you want to send to and fill this in send to

I’d like to be able to send to people from my address book where a dialogue would say who would you like to send the email to and I would write in like peter, john, George etc and that would populate ...
1
vote
2answers
393 views

Need Help with an Applescript / plist

This has been a learning experience for me. Everything checks out logically to me in this script/ plist but something isn't correct. Everything runs, but then the script runs every minute which is ...
0
votes
2answers
353 views

Writing an e-Mail app in applescript

I'm using a webmail account(NOT Gmail: hate its interface), and I DON'T want to use the mac's Mail app(must maintain double contacts lists for one thing). I use Google Chrome and have set the ...
0
votes
4answers
842 views

How do I generate a random even number with Applescript?

I'm trying to create an Applescript that will change the MAC address of my router automatically. Some fields need to be even numbers but I can't figure out how to generate even numbers only. Heres ...
0
votes
2answers
373 views

Running Applescript using cron jobs not working

I'm new to conjobs and applescript but I have the script done correctly i believe. (any critique is welcome) I don't want to bloat my calendar with events to do this because I use my calendar for ...
3
votes
1answer
548 views

Are there more robust tools than Automator to extract text from multiple PDF?

There is an action in Automator that allows you to programmatically "Extract PDF Text", but it fails when fed a moderate amount of files (25 to 100). Worse, it fails without logging anything helpful ...
0
votes
0answers
54 views

FileMaker 6 and AppleScript: Deleting a Menu Item

I am trying to write an AppleScript to delete or at least disable certain menu items in FileMaker pro 6. My documentation indicates that it can be done, yet even the exact examples that they give, do ...
1
vote
0answers
178 views

Can I find and replace Core Text/Cocoa text strings in any application?

My scenario: I use an app called Antetype for UI design. Antetype uses OS X-native technologies for text rendering (it uses the system-standard text palette). Antetype does not have a find and ...
8
votes
4answers
3k views

look up a word in Dictionary.app in Terminal

Is there a bash or applescript to look up a word in /Applications/Dictionary.app from a Terminal window ? open -a /Applications/Dictionary.app/ --args word ignores --args, says "type a word to look ...
0
votes
1answer
44 views

Is it possible to show custom icons in the Scripts menu?

You know that "scripts" menu you can show in the right side of the menu bar? It's very useful. I'm talking about this menu: I've set some custom icons for the files in the scripts folder using the ...
1
vote
0answers
701 views

Can a new mail be sent using AppleScript + Outlook + IMAP?

I'm trying to use apple script to automate creation of a new outlook mail message. The below code will work when I have my email account sent up as pop3 but I need it to work with an IMAP account. ...
0
votes
1answer
241 views

Swap Mouse Button using AppleScript

I use mouse with left-hand. My system is shared with other people who are right handed. So, I need frequently to switch mouse button. I would like to know how to swap mouse button using AppleScript? ...
0
votes
1answer
156 views

Set environment variable for the process before startup [duplicate]

I have the following situation: I have Mac OS bundle with application which uses some 3rd party dylib's and those dylib's depend on some env variable, let's name it ENV_VAR. I want to set ENV_VAR to ...
1
vote
0answers
139 views

Touching files in correct order

This code touches files in alphabetical order. I need to touch files in order it is in list_of_files, so first it touches file2, then file3, then file1). Is there any other way to do this than to ...
1
vote
1answer
113 views

Source code to string in variable

In AppleScript Editor i can see that source_code has script content but row 2 fails for some reason. set source_code to load script (POSIX file "/path/to/script.scpt") word 2 of source_code This ...
3
votes
1answer
545 views

“@” symbol in password in applescript

I am using an applescript to mount a users home folder. However, when I use a password with a "@" symbol the script fails since the "@" symbol is also the separator between the password and ...
-1
votes
1answer
43 views

Creating preview and icon for screenshots [closed]

I would like to make this code to automatically create preview and icon so it looks nice in Finder and so i don't have to wait my graphics app to create these things when i first time open in browse ...
2
votes
2answers
478 views

Applescript to run when iPhone connects/disconnects

I'm trying to figure out how to run an applescript when I connect and disconnect my iPhone with the USB cable. So far, I think I can run an applescript when it connects by using Image Capture ...
3
votes
1answer
365 views

Is there a maximum length of metadata that can be written in one xattr command?

Is there any text length limitations for how long text can be put to xattr? I plan to put my AppleScripts source code to script files so Spotlight can find it. Using Finder Comments isn't an option ...
1
vote
2answers
730 views

Using mdfind to evaluate the text content of a specified file?

I would like write an applescript to evaluate whether a particular file contains a specified string (perhaps as part of an if... then statement). I want to invoke a shell command using mdfind to do ...
2
votes
1answer
101 views

How to get inode from alias file?

In this MacWorld forum thread aliases are described as Aliases can reference an object in the file system either by a persistent ID or by path. Generally they will contain both pieces of ...
2
votes
1answer
2k views

Automatically forward “Starred in Gmail” messages to OmniFocus

Summary: I would like to create some sort of an automated process where any messages that I 'star' in Gmail (aka 'flag' when using Gmail via IMAP) will automatically be added to OmniFocus, and then ...
1
vote
1answer
680 views

How to get color of pixel in coordinates 123, 456 in screen?

My AppleScript app needs to get color of pixel in coordinates 123, 456 in screen.
3
votes
2answers
351 views

How do I use screencapture for capturing floating windows?

I am trying to automate the periodic capture of a floating window. Specifically, of the floating 'Current Call' window which is used by Skype when the main window is off-screen. By googling, I found ...
0
votes
2answers
159 views

How do i automatically send ebooks to my Kindle?

I would like to create an automation, that automatically sends a new file to my kindle email address if i put a new ebook into that folder. How would a script look like, that i would have to apply to ...
8
votes
3answers
3k views

How to programatically add folder to Spotlight “do not index”?

Is there any way to programmatically add a folder to Spotlight's "Privacy" tab? Either through Terminal or Applescript? Often I want to click on an item in Spotlight results in Finder, and have that ...
0
votes
2answers
534 views

Thread count of process x?

My AppleScript needs to get thread count of process x. I have tried many ps etc codes but all these are not working for some reason. I tried these: do shell script "ps uH p 301 | wc -l" -->" ...
0
votes
2answers
110 views

What is the maximum amount of file arguments I can pass to a command?

If I do this in OS X, what is the maximum amount of files I can test? Or is there a maximum length for this string? do shell script "md5 -q 'path/to/file1.txt' 'path/to/file2.txt'"
3
votes
2answers
325 views

Have Voiceover read out just paragraph or sentence under cursor

I work with a disabled user who controls their iMac using keyboard and mouse input from their communication-aid. They have dyslexia and would like to use voiceover to read certain paragraphs or ...
2
votes
2answers
2k views

Shortcut to eject all external hard drives but not MobileBackups

So far I've been using the following AppleScript to eject all external drives at once conveniently using a shortcut: tell application "Finder" eject (every disk) end tell This script is is ...
2
votes
1answer
1k views

What techniques work to handle errors in AppleScript so I can place a dialog?

I'm new to programming and AppleScript and I have lots of problems with error handling. Could anybody share their error handling for file operations like move/trash files? Here is my code so far: ...