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

learn more… | top users | synonyms (2)

0
votes
1answer
62 views

How to search through online сhеss games using AppleScript or Automator?

I would like to search for specific online сhеss games. Each game has a single adress. Since there are millions of games on instant chess, it would take far too long to index all the games. So I will ...
0
votes
0answers
192 views

How to export a movie from Keynote via AppleScript at greater than 540p?

I want to create a tool that will automatically convert Keynote presentations to movie files. I have discovered that the current version of Keynote has an export command in its AppleScript dictionary: ...
0
votes
1answer
162 views

AppleScript counts multiple Mail messages

In this AppleScript on Mavericks: tell application "Mail" activate set viewer to the first message viewer set msgList to selected messages of viewer end tell set msgCount to 0 repeat ...
2
votes
3answers
86 views

Applescript for moving recently added files (not created or modified) to another folder?

I would like to get a recent downloaded pdf file ( !: it corresponds to the Finder sort method Date Added, not Date Created nor Date Modified) and either just moving to one another folder (if using ...
3
votes
2answers
399 views

Can AppleScript be used to downloading files from a web page?

I want to write a script that searches a web page for an updated file, then downloading it when detected. There is no command I have found that does this, accept Automator's download URL function, ...
2
votes
1answer
65 views

Simulate CTRL+F12 2 second keypress

Im trying to bring up the OS X shutdown dialogue box by simulating the key press Control+F12 for 2 seconds (using a logitech keyboard). No matter how much I try I just can not get it to work. My ...
1
vote
0answers
281 views

AppleScript for moving mail messages to OmniFocus is creating duplicates in OmniFocus

I'm trying to customize this script to import all flagged mail messages in Mail.app to Omnifocus, then unflag and archive the message. It works, but it creates many duplicates in the Omnifocus inbox ...
1
vote
1answer
367 views

Go to the Running Safari And Press Enter Using AppleScript

I'm very new to AppleScript and I'm trying to do this. I have an Safari process running on my machine. I wish I could go to the running safari and stimulate an enter key event. Is it possible to do ...
2
votes
1answer
619 views

Using Hazel or AppleScript to Convert Word to PDF

I use Hazel to sort and rename files. I would like to use Hazel to automatically convert Word docs to PDF. I think this best way to do this is with AppleScript. I have searched extensively online, but ...
0
votes
0answers
66 views

How to run an AppleScript whenever a VNC connection is established?

I want to run a script whenever any user connects remotely to my Mac. I've Googled a bit about it but no perfect tutorial is there. I am less comfortable working with OS X.
1
vote
2answers
954 views

automator to run AppleScript for a shell script

For a selected file in Finder, I like to run a perl script using Services. I created an Automator process that runs an AppleScript: on run {input, parameters} tell application "Terminal" ...
2
votes
1answer
112 views

How can I rename an ordered list of files with an ordered list of file names?

I have a series of files. I need to apply a series of file names. So, 001.jpg -> apple.jpg 002.jpg -> banana.jpg 003.jpg -> orange.jpg etc. I will have to repeat this for each of 16 folders with ...
1
vote
2answers
102 views

How to display the MiniPlayer in iTunes with AppleScript?

I use an Automator workflow to open iTunes at startup, etc. I'd like it to open the MiniPlayer window. I don't see a function to do that in Automator. How could I do this with an AppleScript script? ...
0
votes
0answers
32 views

Change destination mailbox of Command+Control+A in Mail

In my Mail.app, I have only one account set up, which is an Exchange account. When I click on a message on my Inbox (which is a server folder), and press Command+Control+A to archive it, Mail.app ...
1
vote
2answers
422 views

AppleScript and Finder - How to detect an “empty” selection when copying paths to the clipboard (Expanded Question)

I'm trying to build a Service that does the following: If some folder/files are selected in Finder, copy (all) the paths to the clipboard If nothing is selected, copy the "Path" of the window. ...
3
votes
2answers
539 views

Automate taking a screenshot of specified area

I am trying to use automator to take a screen shot of a specified area. Though I can only find the option of taking a screenshot of a windows or the entire screen. Is there a option to to this with ...
4
votes
1answer
110 views

osascript to set secondary desktop background?

I have been using this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd> <plist ...
2
votes
0answers
45 views

Sort Stickies by desktop

I have OS X Lion 10.7.5 with four desktops and also have 4 groups of stickies (one group per desktop). Every time that I have to reopen the Stickies app, they are unsorted (all stickies open on the ...
2
votes
1answer
778 views

Applescript to copy folder (and contents) to current location?

I am trying to create a button on my Finder toolbar powered by applescript to make a copy of a set folder (e.g. /Users/James/doc) and all files/subfolders within it to the current location in Finder. ...
2
votes
1answer
72 views

Why does “if exists” fail with a false positive?

The file, "Test.file" in the below code does not exist, yet the script returns true. Why? What am I doing wrong? set thePath to (path to application support folder from user domain) if exists ...
8
votes
2answers
166 views

How would I go about making a stand alone app on my dock to open a game using a terminal command?

I have a game that they never released for mac, and I installed the game using WINE, the install itself was flawless, but every time I want to play it, I'm forced to open Terminal and run cd ...
0
votes
0answers
46 views

Script to change mail heading

I often need to change the heading of a received mail item, so that I can find it again in a Mail folder. Easy on Outlook, not in Mail. I found a tip as to how to do it (possibly on this forum): ...
1
vote
1answer
41 views

Getting the lower variable

In applescript I have 4 variables, each one with its number. I'd like to have a function that tells me which variable is set to the lower number. EG. set one to 12 set two to 55 set three to 2 set ...
2
votes
3answers
112 views

Create hotkey to insert text

I want to create a hotkey command that insert this text "/" in whatever application I'am The reason is because I'm a developer and I use the / symbol a lot, the problem is with my keyboard layout, ...
0
votes
1answer
84 views

Windows positioning with applescript

I want to set the position of some windows to certain coordinates. In particular I have 4 possible positions that those windows should have. For example if I have 4 windows opened I want them to go ...
1
vote
2answers
102 views

Escaped path in AppleScript adds leading /

I have the following AppleScript that I am trying to debug: tell application "System Events" set theResult to (do shell script "sqlite3 ~/Library/Application\\ Support/Dock/desktoppicture.db ...
0
votes
0answers
109 views

Applescript to enable internet sharing, but select where to share the connection from

I have the following applescript code that turns on internet sharing. What I want to be able to do is also have the applescript choose which connection I am sharing from the dropdown menu list. 1 ...
1
vote
1answer
53 views

Can't save AppleScript file when created by touch

I'm used to create file using touch before opening them with open. But I came to this following problem : When I do this with AppleScript files AppleScript Editor is able to open the file but unable ...
2
votes
1answer
37 views

Best way to distribute script with low friction

I have helped a few friends recently with fixing a problem on OS X and I would like to turn it in to a script so I can send it to people instead of walking them through it. It consists of two steps: ...
0
votes
1answer
948 views

How to create applescripts for Outlook 2011 to replicate Quicksteps?

Outlook 2010+ for PCs includes Quickstep functionality, that allows you to create multistep rules or macros to easily perform actions on selected email(s). Examples are automatically categorize an ...
1
vote
1answer
265 views

Applescript enable-disable wifi Safari

I figured out a command to enable/disable wifi. networksetup -setairportpower en0 on networksetup -setairportpower en0 off Now, I was wondering how to combine it in AppleScript in a way that when ...
2
votes
2answers
1k views

Allow application to control computer (assistive devices) on Mavericks via Terminal?

I'm currently working on automated instalation of Mavericks 10.9. I have NetBoot set up. Everything works OK untill I want to execute Applescript. Since the release of new version I need to manually ...
0
votes
0answers
35 views

Applescript to change main monitor

Is it possible to record some actions for figuring out the right applescript? I'm looking for applescript to toggle my computer from screencast settings to regular: Regular: 1. Display Time. 2. Main ...
3
votes
1answer
91 views

AppleScript Editor : comment line shortcut?

Is there a keyboard shortcut to comment lines in AppleScript Editor ? The common Cmd+shift+/ does not work here.
0
votes
1answer
300 views

How to select message in Mail with ID using AppleScript?

With the help of "Ask Different" I got my first AppleScript program working, and I'm trying to improve it. I'm again stymied though. I have found the message number ID of a particular message in my ...
1
vote
2answers
644 views

AppleScript for counting messages in Inbox fails with “Can't get mailbox”

Here is my first attempt at an AppleScript program, which met with ignominious defeat: tell application "Mail" tell mailbox "INBOX" count messages end tell end tell It compiled, but ...
2
votes
2answers
119 views

How can I automate GIF to PNG with Preview using AppleScript?

I have a GIF file but I can open it only with Preview because it is a little bit ruined (GIMP or other programs does not open it correctly but it works with Preview). I want to export it to PNG ...
1
vote
1answer
123 views

AXSelectedRows: Getting selected rows for AXOutline

I feel that AXSelectedRows has finally beaten me into submission :) After extensive research, I am stumped as to how to programmatically list the contents of AXSelectedRows; simply put, to get the ...
1
vote
1answer
119 views

Transfer labels (“tags”) from a SMB share to an AFP share

I had a SMB share from my NAS (based on illumos aka OpenSolaris, I used the kernel CIFS) and now I installed Netatalk for better performances. The metadata apparently cannot be read back, that means ...
2
votes
2answers
117 views

How do I link/call an actual shell script saved within an Applescript app?

What's the correct syntax in the Applescript below to make this app run by double clicking on it rather than how it runs now by just running the Applescript in the AS script editor? The Shell script ...
1
vote
2answers
450 views

Applescript dictionary for Preview

Is there an Applescript dictionary for Preview.app? I am unable to find it under Mac OS X 10.7.5, and Applescript 2.2.1. I did a rudimentary search in google and duckduck but came up empty. I've ...
3
votes
1answer
893 views

Toggling screensaver password with script

I am using a rather old application called Proximity to trigger applescripts when my phone goes in and out of bluetooth range of my mac. Along with other tasks, I want to secure my laptop when the ...
1
vote
0answers
68 views

How to prevent AppleScript confirmation from appearing when using Quicksilver trigger?

When I launch this simple AppleScript from Finder or by using the standard Quicksilver panel selection, it runs without confirmation. tell application "Flux" if it is running then quit ...
1
vote
1answer
125 views

Trying to remove files listed in file with AppleScript with do shell script call

The following code is an example of what I'm using at the moment, but it keeps erroring out on me: do shell script "find /Applications -name 'Bingo.app' > /tmp/remove_files" with administrator ...
1
vote
3answers
120 views

AppleScript variant of find(1)

How would I write the following as an AppleScript command without the use of bash scripting? find / -file foo.txt I might have the bash syntax wrong, but I want to search from the root of the drive ...
0
votes
1answer
74 views

How can I keep System Events from deactivating?

I'm using more and more Applescripts for home automation that rely on System Events being active. The problem is that System Events shuts down if it hasn't been used for a while. I'm not sure how ...
1
vote
2answers
283 views

AppleScript for moving completed downloads to other folders

I'm looking to write a script that will move all file in the downloads folder (once fully downloaded) to different folders on the hard drive and external hard drive. Where can I learn more about how ...
1
vote
2answers
141 views

Run applescript after specific application launch

VLC can't autoload extensions, so I write applescript to load extensions, now I need make run it every time after VLC start, any suggestions ?
0
votes
1answer
408 views

Printer Setup Utility gone in Mavericks, how to set default printer in Applescript now?

I have some Applescripts that set the default printer using "Printer Setup Utility", that seems gone in Mavericks. Anyone have an alternative to suggest?
4
votes
1answer
73 views

Automatic Window Switcher

I'm looking for a Mac app that will accomplish the following: Switch between two full-screen mac apps - Tweetdeck and iCal, automatically on a timed interval. Back and forth without stopping. We ...