AppleScript is a proprietary programming language in Mac OS X to control and exchange data with applications.
8
votes
3answers
482 views
Copying files to the clipboard using applescript
Often I find myself at the command line wanting to copy files to the clipboard, so that I can paste them as attachments in Mail. If I have an image file, image1.png, I can accomplish this with
...
1
vote
2answers
120 views
Applescript to compare two lists of domains and eliminate duplicates
I tried to do this with Automator and found it...lacking. I have tried to look for solutions everywhere else I can think of, but my searches keep pointing me to Applescript as the only available ...
1
vote
1answer
69 views
Checking button text with applescript
I'm trying to automate CCleaner, so far I can start the application and click the button that starts the cleanup job, however I'm relying on a delay to determine when I should move onto the next ...
2
votes
3answers
190 views
How can I run a PHP script by dropping file on icon?
I have a php script that takes a filename as an argument. When I run it from a terminal window I type
./my_script.php file_to_process.txt
It works great!
What I would like to be able to do is to ...
1
vote
2answers
65 views
Problem with empty spaces when executing shell commands in AppleScript
The following code to purge a directory recursively does not work because I cannot get past the Application Support folder.
try
do shell script "rm -r ~/Library/Application\ ...
0
votes
2answers
896 views
Applescript to add sender of message to specific group in Contacts
I'm trying to set up an Applescript to add the sender of a selected message in Apple Mail to a specific group in the Contacts app. By reconfiguring the code provided in this answer, I worked up the ...
2
votes
2answers
386 views
AppleScript to add files to an iOS app under iTunes
I know it's possible to write an AppleScript to add music and video files to the iTunes library. Is it also possible to write AppleScript to add files to iOS apps that use file sharing?
For example, ...
0
votes
0answers
50 views
Code problem with Bibdesk applescript
I've download an applescript to BibDesk from this web (go here for the applescript), but I have a problem running it.
The AppleScript Editor returns:
Syntax error -- Expected end of line but found ...
0
votes
1answer
55 views
Applescript and Fantastical
I trying to add a Fantastical event with AppleScript. Aparently the Fantastical Suite is quite simple as there is only one verb.
parse sentence v : parse sentence
parse sentence text : sentence ...
1
vote
2answers
832 views
Can Applescript be used to automate a screen recording session on OS X?
I need to accomplish the following tasks from a script:
Initiate a screen recording (with system audio).
After a set delay, stop the recording.
Save out to a file.
Close the recording.
I've tried ...
0
votes
0answers
48 views
How can I make compiled applescripts on $PATH be found and executed?
I have some short applescripts that I want to use as utility functions inside shell scripts-- for example, one returns the name of the frontmost application. The scripts reside in a personal scripts ...
3
votes
2answers
441 views
Why does this applescript not actually set the input volume to zero?
I have this command that builds a script to mute the input volume. The input volume is not fully muted, though. It seems to be closer to 10% than 0%.
osacompile -x -e 'tell application "System ...
0
votes
1answer
117 views
Applescript dialog, Bash alias/function
I'm trying to create a short alias for creating System dialogs from the Terminal. I tried to create a Bash function (since an alias didn't seem to take arguments) and add it to my .bash_profile, but ...
0
votes
1answer
171 views
using automator/applescript to upload files to a web form?
I have a bunch of files I want to upload to web page. Unfortunately the web form for uploading only allows me to specify one at a time (it spawns and 'open file' dialog). Is there an easy way to do ...
3
votes
1answer
245 views
Save attachments from Mail.app based on subject
I have been trying to write an Applescript to help me saving attachments, but realized quickly that I do not have the knowledge to do such a difficult script. Here is some background.
We receive ...
0
votes
3answers
425 views
Applescript to disable screen saver through sending keystroke
I'm trying to write an applescript that will disable the screen saver through sending a keystroke. Something like sending a "shift key" pressed every 30 seconds.
I don't want to have the applescript ...
4
votes
1answer
119 views
Execute a custom script when OS X 10.8 is in Power nap?
Apple new feature of OS X 10.8 in new Macs "Power Nap" checks email and does make backups.
Is it possible to execute a custom script (bash, AppleScript,...) when OS X 10.8 is in Power nap mode? For ...
1
vote
1answer
399 views
Create playlists for full albums in iTunes (i.e. albums with all songs)
How could I create playlists for all of the albums in iTunes for which I have all of the songs? Assume that track number & track count metadata is accurate where specified, and don't worry about ...
5
votes
2answers
406 views
How to disable individual USB ports by script?
I am looking for a script which will allow me to disable one specific USB port on my Mac mini. It would only serve a purpose if it works in real-time and didn't require a reboot. I've found scripts ...
3
votes
4answers
543 views
Can I download all pictures on a page?
Is there a way I can run a script with a certain web page as the argument that will download all the images from there?
0
votes
1answer
121 views
Toggle Apple Mail “Classic Layout” with shortcut?
Can anyone figure out a way to switch Apple Mail (v5.2) to/from "Classic Layout" mode with a hotkey? Maybe via Applescript?
0
votes
1answer
80 views
How can Growl trigger an shell script or AppleScript (NOT vice versa!)
When a Growl notification gets issued I want to trigger an AppleScript. I had a look at the "Actions" in the Growl preferences, and you can trigger things like an email or a text-to-speech call, but ...
2
votes
2answers
123 views
Using cURL to download images in XML feed?
I have an XML file that has links to various .jpg I want to create an applescript that downloads a local copy of these. The idea is to also label them sequentially with a number say 001 to 030.
...
0
votes
0answers
37 views
Launch Applescript with RFID
I currently have from SparkFun an RFID Reader (SEN-09963 + ID20 SEN-08628) that is connected to my Mac (10.8 if you are curious) What I have so far: the device is built, in a project box, connected ...
5
votes
4answers
4k views
How do I make an AppleScript with a drop-down menu without Xcode?
How do I make an AppleScript that displays a drop-down menu without using Xcode?
0
votes
1answer
106 views
Applescript to automate drop-down selection in Mozilla Firefox
I'm trying to automate the selection of a value from a drop-down box in Mozilla using an applescript. What I want it to do is to tab to the drop-down box and enter down twice to select the third item ...
1
vote
0answers
49 views
Why would a Folder script stop working in 10.8.2? I have been using this script for several years
property disk : "Webserver:RAID:active_jobs" -- name of mounted disk where all work resides
property folderactive : "Active" -- name of Folder were active jobs folders are held
property destination : ...
1
vote
0answers
101 views
How do I tell Finder to read the network folder contents?
I use the following AppleScript script to automatically connect a remote drive when my VPN connection is established using Viscosity:
do shell script "sleep 5"
tell application "Finder"
mount ...
0
votes
0answers
82 views
Why doesn't this simple applescript work any more in ML mail.app (as a rule)
It works only when you right click on the mail message and choose "run rules", but not on incoming messages (without interaction).
The first dialog is shown both when incoming or running manually, ...
0
votes
0answers
46 views
Change background alpha in iterm2 with shortcut
I'd like to have something like
⌘ + + and ⌘ + -
(even better) alt + scroll wheel
To control the alpha of background in iterm2, like in the gnome terminal with compiz accessibility.
Some hint? ...
0
votes
0answers
118 views
How to set codec for Quicktime 7 export with AppleScript
I'm new to applescript and I'm having some trouble with a batch export of video files.
I'm trying to transcode several image sequences into .mov using QT 7, via Automator.
I found this code that ...
0
votes
0answers
63 views
How to add a script that types in the password for my vps through applescript
I made a script recently and have turned it into an app, it basicly logs me into my vps via ssh but I don't know how to tell it how to type in my password for me, heres the code
tell application ...
2
votes
1answer
369 views
Applescript to turn off Mission Control in OS X 10.7
I found most of the below on https://discussions.apple.com/thread/3046230?start=0&tstart=0, but I believe it relates to OSX10.6 (or earlier) given that Mission control seems to have replaced ...
1
vote
1answer
44 views
How to invoke a script when closing any file with a given extension
Is it possible to automatically invoke a given applescript when closing -any- file with a given extension in a specified folder (and subfolders)?
If not in AS, is this possible in bash? (The AS I am ...
29
votes
3answers
12k views
How can I trigger a Notification Center notification from an AppleScript or shell script?
I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write.
Is there a built-in command or a third-party library I can use from either an ...
2
votes
1answer
137 views
Hide windows in current desktop (Lion)
I'd like to make a keyboard shortcut that hides all windows on the current desktop, while ignoring windows on other desktops. Is this possible using Applescript?
1
vote
2answers
104 views
Applescript creating Sym link with spaces in the path
I'm trying to create a sym link to a network directory when i log in. This is working for a couple of other directories without spaces in the name, but for the life of me I cannot get this one ...
0
votes
1answer
185 views
Apple Script + VPN + Textbox
I have an applescript :
tell application "System Events"
tell current location of network preferences
set VPNService to service "VPN (Cisco IPSec)"
if exists VPNService then
...
2
votes
1answer
103 views
Can OS X automate creating a reminders from a page in a web browser?
I enjoy the feature of creating reminders from a web page with one click. similar to how Omnifocus does this.
Can Apple's Reminders do the same by apple scripting or other addition/short cut?
0
votes
1answer
210 views
Applescript Click “Go” and “Open” - dialog inside application
In PCSX, (ps1 emulator), I'm trying to automate the steps to play an ISO. So, I'm doing this:
set thepath to path to me
set thesecondpath to POSIX path of thepath
set thethirdpath to ...
0
votes
1answer
148 views
Script to be activated if web page changes [closed]
I'm looking for a way to have a script running on my desktop that will check a certain webpage for changes every x seconds, and if a change is made, it gives me an alert. I understand that with ...
1
vote
2answers
985 views
Change Date Created based on the filename
I've downloaded a bunch of my Instagram images but the Date Created of the files is set to the time that I initiated the download. What I do have though is the Date Created in the filename. What I ...
2
votes
1answer
49 views
Unique volname for DMGs
We have a build process that is now doing the common layout for distributed DMGs. This is done in a way that I've seen in many places -- the DMG is attached, then Finder does its job via osascript. ...
2
votes
1answer
73 views
Is there a GUI viewer of databases created by Database Events?
I wrote a simple AppleScript that saves data to a Database Events database. I see the database (DBEV file) in my ~/Documents/Databases folder, and I am wondering if there is a simple graphical utility ...
0
votes
3answers
146 views
Setting a variable to the result of a terminal command within an applescript
I'm trying to make a script that ejects all connected external drives and does not move on until they are all disconnected.
The main problem I'm having is being able to set the variable vol_count to ...
0
votes
1answer
152 views
Any way to delete custom fields of cards in Contacts.app?
Some custom fields of contact cards in Contacts.app are really annoying. For example, nicknames always appear in Mail.app. To make things worse, there seems to be no menu option to delete custom ...
1
vote
1answer
133 views
Automator finish one task before moving on?
I have automator running several applescript commands that I want to happen sequentially. For example, I have an empty trash command, then a shut down command. When I run the script, the computer ...
4
votes
1answer
208 views
Any way to write the Terminal scrollback history?
I would like to open a new tab in Terminal with custom scrollback history. The primary use-case is to "fork" an existing tab such that both tabs contain the same scrollback history, but more generally ...
1
vote
1answer
113 views
How can I remove the Job Title and Company from all Address Book contacts using AppleScript?
I would like to remove the Job Title and Company from every contact in my address book using AppleScript.
Any ideas?
0
votes
2answers
201 views
Is there a dial from Addres Book and tel:/sip: protocol handler script/application available for 10.7?
We are currently using Mac OS X 10.6 and snomURLHandler to convert tel: uri's to a http GET request. This computer telephony integration let us click on a telephone number in Address Book.app and let ...


