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

learn more… | top users | synonyms (3)

0
votes
2answers
406 views

Mac OSX Apple Script, How do I make Apple Script push keys on an application

What I am trying to do is make my character run up 50 steps then down 50 steps repeatedly using the up key and the down key. I know how to utilize system events to push keys and I know how to tell ...
1
vote
2answers
707 views

Why does this Applescript often fail the first time, but always work after that?

The following Applescript opens a menubar app called QuickHue and then clicks a specified item in the menu. Often, when I use the applescript, it does nothing. But if I wait a moment or two and try ...
2
votes
1answer
125 views

Send mail after found new items inside the folder

I am running an applescript application using stay open option. Function of the script is: the applescript will ask for "javascript" to run the below is my code. the functions of the javascript is ...
0
votes
1answer
106 views

Applescript, quit app if other app is quit

I have a (very basic) apple script that I use as a trigger to start and hijack Plex, using Audio Hijack Pro. tell application "Audio Hijack Pro" start hijacking session named "Plex" end tell tell ...
1
vote
2answers
218 views

How do I invoke a service using Applescript?

I'm using Circus Ponies NoteBook which doesn't support Applescript methods. It does support creating services that can clip the current selection into a NoteBook page. This allows me to select text ...
0
votes
2answers
96 views

Toggle Mail Classic View in Mountain Lion with

I found a script on this site which I edited to make work with Mountain Lion, I thought. It works fine from Automator, but when I save as a service and assign a keystroke to it, it does not. Any help ...
0
votes
1answer
80 views

How do I add a custom field to the login dialog?

When the screensaver has been disturbed, or the computer wakes from sleep, my system asks for a password. I would like to add to this dialog. Along with username and password, there would be a third ...
1
vote
1answer
1k views

AppleScript to close “About this Mac” window

How could I use AppleScript code to close the window named "About this Mac" (A propos de ce Mac in French). I need an AppleScript for this because I use Dragon Dictate 3 commands. I am handicapped and ...
0
votes
0answers
105 views

How can I use AppleScript to reshow the last OS X notification (in the notification banner)?

After the notification disappears, I want to be able to make it appear again through AppleScript.
1
vote
4answers
10k views

method for using F4 key without press function button in one macbookpro

i'm using a program that uses the F4 key for a shurtcut. it is an important shortcut and i'm heavily using it. every time in my mac book pro for press F4 i have to press also the fn button. is there ...
1
vote
1answer
2k views

Applescript code to simulate Command and Shift keys

I am handicapped and use Dragon Dictate 3. I need to take control of my Mac with Dragon, because I am not be able to use the keyboard. I need to know some Applescript code to do that. How could I ...
0
votes
2answers
1k views

How to get Automator to treat text as RTF?

I am writing a book and trying to add a service to provide syntax highlighting to text selected in Pages with Automator. I have a service accepts selected text and runs it through a shell command ...
1
vote
1answer
310 views

Using AppleScript to modify contacts not working

I'm trying to use applescript to clean up various problems a large address book, to large to fix by hand. I've been able to find and observe contacts and groups in AppleScript successfully. However, ...
0
votes
1answer
2k views

Permission denied for symbolic link

I'm creating a symbolic link with the following applescript: on run do shell script "rm /usr/bin/ant" with administrator privileges do shell script "ln -s ...
1
vote
2answers
2k views

Why does my Automator service work in Automator but not when called from the OS?

I have made an Automator service that runs an Applescript with the Run Applescript module. This is the script: # Press ^F8 tell application "System Events" key code 100 using control down end ...
2
votes
4answers
342 views

How to get screenshot only external monitor?

I there any way to screenshot only external monitor screen? do shell script "screencapture -x " & shot_path
2
votes
1answer
47 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
45 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
2k 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
398 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
432 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
296 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
245 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
621 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
4k 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
270 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
101 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
52 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
93 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
2k 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
425 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
60 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
373 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
338 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
777 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
363 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
522 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
52 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
173 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
2k 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
41 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
667 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
229 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
152 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
134 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
110 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 ...