Tagged Questions

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
0answers
39 views

How to get Mail.app raw message in the Automator ? (version 2)

I tried this script and it work great. Thanks But my problem is that the text I receive has = character at the end of each line, resulting in some url to be truncated/separated by this = sign. Is ...
2
votes
1answer
47 views

list box in applescript?

I'm trying to have users pick a department from a list box. And then that choice is stored in a variable as string. How can I do this? I have code written like this: set deptList to {"dept1", ...
0
votes
1answer
190 views

String and Variable concatenation not working in Applescript

I'm trying to concatenate at variable within a path name string to make this script more efficient. This is the code I have so far. But I can't seem to find the right syntax needed in order to set the ...
3
votes
4answers
439 views

AppleScript: Press Enter Every X minutes If Terminal is Open and Application Has Been Idle for X Minutes

I am new to AppleScript and am attempting to use it. If I am using Terminal and if I have not pressed a key for x minutes I want my Mac to press the return key. It is to repeat this process every y ...
0
votes
1answer
36 views

AppleScript or Automator workflow to clean orphaned files on Kindle

I'm wondering if there's a way to clean orphaned files from a Kindle using AppleScript or Automator. It would basically look for any .sdr folder that doesn't have a matching .mobi or .azw and then ...
1
vote
2answers
963 views

Have Automator parse down folders and list all filenames without their extension

Automator newbee question here. I've searched around and just can't find what I need (nor fully grasp how things work :-( ). I would like to have Automator parse thru a given folder, which is ...
0
votes
0answers
222 views

AppleScript shows “Document could not be opened. You don’t have permission.” but file can be opened?

I am getting a "The document [filename] could not be opened. You don't have permission" when attempting to access several files in an AppleScript. However, I can open these files manually without ...
1
vote
2answers
786 views

Opening new Terminal.app window/tab with a certain profile from command-line or AppleScript?

When I login to my Mac, I want to automatically open a new Terminal.app window with a certain profile, say Monitor, that has a startup command and several appearance settings. I thought it would be ...
1
vote
2answers
106 views

Play a sound when another application outputs to console

I currently have a program that I can't get the source-code to so I'm trying to find another way to do what I need. I was thinking of having an applescript just constantly listening to console and ...
1
vote
2answers
124 views

How can you set up a free, universal OS X-wide ‘autosave’ script?

I want to set up a free solution in OS X for a universal ‘autosave’ function (given Apple’s own solution is limited to only a few apps - at least for now), and let Dropbox do my file versioning and ...
1
vote
1answer
154 views

AppleScript working until placed in cron; causing Chrome to go unresponsive

Good afternoon. Question: I have a simple apple script telling Google Chrome to open, go to a URL, and enter presentation mode... tell application "Google Chrome" activate make new window ...
1
vote
1answer
210 views

Applescript click action working, but generating a System Events error

I'm working with an AppleScript that turns off (but does not quit) Hazel. The script works fine but generates a syntax error. Here's the part of the code causing the error: tell application "System ...
0
votes
1answer
813 views

Applescript: Comparing variable to string is failing

I have an applescript that gets a list of items and then iterates over them: tell application "GeekTool Helper" set names to name of geeklets repeat with currentName in names if ...
0
votes
0answers
30 views

What scripting framework could work with google translate for a non-programmer?

So I want to create a small workflow that I can integrate into my OS that does this: Translate selected sentence with google translate (fixed languages) and make it automatically get pasted where I ...
2
votes
0answers
46 views

Run rake using Automator

I have install ruby using RVM. Next I create workflow in Automator, which detects new files in folder and then copies them to another dir. The next thing I want - to switch to those folder and run few ...
1
vote
1answer
49 views

How do I tell AppleScript to read the contents of the “Network” Finder window?

I'd like to be able to get the contents of Finder's "Network" folder (Menubar-->Go-->Network). The folder contents here is different than /Network or /net. The overall goal is to grep the names in ...
0
votes
1answer
110 views

Simulate shift-tab with Automator/AppleScript?

OSX 10.9.1, Late 2013 MBPr I am trying to make a Automator workflow to connect to another machine on my network. How can I do this with Automator? I have it all set up up to the point where I have to ...
2
votes
1answer
2k views

Waiting until a window exists in Applescript?

I'm trying to work with the script below and the repeat until exists window "Print"loop never returns true (I never hear the beep 3). Is this the correct way to wait for a window to appear? I am ...
0
votes
0answers
244 views

Applescript Display notification with Trigger

I have an applescript written to display a notification in the notification centre when I get a new email in outlook for mac. i.e. display notification mycontent with title mysubject subtitle ...
1
vote
1answer
272 views

Automator quarantine Gatekeeper workaround?

I am using my Developer certificate to sign Automator Apps via the Export dialogue, however when distributing these apps (outside the Mac App store) via email, Gatekeeper still flags my apps as a from ...
0
votes
3answers
645 views

Applescript - Unable to find resource when inside application

I have a regular Applescript application bundle that executes an applescript file when it's run. I'm trying to run a shell file that is located at "/Contents/Resources/Data/df.sh", however with the ...
2
votes
1answer
91 views

Change keyboard whenever iTerm is selected

Using either Applescript or Automator is it possible to switch the software keyboard(Input Source) to a certain keyboard(input source) whenever iTerm becomes foreground? Scenario is as follows I ...
0
votes
1answer
54 views

Mail rules with Script Warning message

I am getting so fed up with this: It is too real not to make the mistake in a moment when I am not fully on alert (and to be hones that stresses me out), and I want to use my powerful Mac to ...
1
vote
1answer
57 views

How to script a logout while screen is locked?

I want to log out a user via a shell script, after a delay. However, there's a few other issues: User does not have admin and/or root. Logout must complete even if screen is locked. Currently, I'm ...
0
votes
0answers
14 views

How do I Install the xcode command line tools without the confirmation and license prompt? [duplicate]

I ended up answering this myself but I figured I'd throw it up here to document it. xcode-select --install asks if you are sure you want to install the script, then it prompts you to accept a license ...
1
vote
1answer
78 views

Automator get first 3 letters of parent folder

How do i get the first 3 letters of the parent folder im creating a folder in with automator im designing a Automator service to create a project folder in the folder of a client and I want to append ...
1
vote
0answers
88 views

Third party apps can't call applescript that otherwise work in 10.9

I am invoking my apple script from third party executable(C executable). Here is the applescript: on run argv do shell script ("open -n /Applications/Test.app/ --args " & "'" & item 1 ...
0
votes
1answer
111 views

Automator rename finder item date and time

I want to use automator to create a project folder with a Automator service, but i like to add the month and year (with two decimals) not the day, month and whole year. want i can creatie is ...
0
votes
1answer
24 views

Naming Folders usin

Is there a script that allows one to insert text from the clipboard into the name field of a new folder? I would like to name a new folder or change the name of a folder using the last text clip.
0
votes
0answers
85 views

Export reminders from osx Reminders app programmatically

I need to get reminders list in any form (could parse it later) from Reminders app in osx (10.9.1) I know that i could do it from menu, but i need it programmatically. Perfectly it would be some ...
4
votes
2answers
840 views

Applescript: Open current Safari tab in Chrome (Troubleshoot of working script)

So, I decided a while ago to run a Flash-free install of Safari. It's been really great, Safari seems much more stable overall and I barely miss it. But every once in a while I stumble upon a site ...
0
votes
0answers
23 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
1
vote
0answers
35 views

Automatically reduce MacBook brightness on connecting to external display?

I would like my macbook to reduce its screen brightness to zero when I connect it to an external display. I know there's no such setting, but how would I go about writing a script that would do that? ...
3
votes
2answers
104 views

How to close applications on sleep?

I have a password management application (KeePassX) of which backup I sync over Dropbox across several computers. However the password database can be open only on one computer at a time for file ...
0
votes
1answer
56 views

Using quotes in SublimeText build system command

I'd like to execute a simple AppleScript command as part of a Sublime Text build system. I created a sublime-build file where the command is "cmd": ["osascript", "-e", """tell application "Preview" ...
0
votes
1answer
81 views

Automator application needs to ignore all files that aren't EPS

I've made an application that I drop EPS files on and it makes two copies and renames them and transfers them to SMB shares. But sometimes when I have more than one file selected in other windows, ...
1
vote
1answer
41 views

Randomize ical event start times

I have an event in ical that recurs every day. I would like to randomize the start time of this event (which schedules an applescript) so that the start times are random but within 30 min of each ...
1
vote
1answer
74 views

toggle playPause for iPhoto, script problem, probably global variable

I need toggle playPause for iPhoto, so I wrote this script global isPaused try get isPaused on error set isPaused to false end try tell application "iPhoto" if slideshow running then ...
4
votes
1answer
147 views

Moving full screen apps between monitors shortcut

Does anyone know if it is possible to move a full screen app to another monitor using a shortcut? Or if there is no existing shortcut would it be possible with Applescript? BetterTouchTool has "Move ...
1
vote
1answer
267 views

Mail.app Automator/Sript action for suspicious emails

I am getting fed up with the surprisingly professional looking SCAMS arriving in my Inbox. I wanted to create an Automator action which would tell me who is the actual sender by looking up the IP it ...
0
votes
0answers
56 views

Change all birthday events to occur yearly in iCal?

I want to make all birthday events in my iCal repeat yearly(some of them were not added with "repeat yearly" set). I am doing them on a event by event basis but that is too painful. Is there a way to ...
1
vote
1answer
96 views

How to create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)

I need to create an apple script to perform DD Commands in sequence, to replicate the same .img file to multiple USB flash drives The context: the computer is connected to a powered USB hub with 7 ...
1
vote
2answers
3k views

Using Javascript | Applescript to click button in Safari

I realize there are several threads about this and they are all very specific to certain website . My background is in Python, not Javascript or Applescript, and I'm confused on exactly how to achieve ...
0
votes
2answers
72 views

Universal path in Terminal

I'm writing an AppleScript that will allow me to copy the Time Machine folder from an external drive and paste it onto the user's desktop of their Mac. The reason I'm doing this is because when a time ...
0
votes
1answer
105 views

Error with AppleScript - Integer?

I have been making a simple script for my sister, but it does not work. It calls for an integer? I did not specify it in my program, but it calls it anyway...? My Script: activate display dialog ...
1
vote
1answer
247 views

Converting videos in the background using automator and handbrake

I am trying to automate the process of video conversion using handbrake and automator. Here is the script that i am using in Run Shell Script action of Automator Folder Action: for f in "$@" do ...
0
votes
2answers
262 views

script copy sender(s) email address only to the clipboard

I am a blind voiceover user of mac. The new Mail.app makes it difficult to copy the sender's email. I would like to have a script which copies the sender email only, of one or more selected ...
1
vote
2answers
579 views

Create a New Space in Mavericks using Applescript

In Mavericks, is it possible to use Applescript to create a new Space in Mission Control? I also tried the following code to switch to another Space, but it does not seem to do anything... tell ...
1
vote
1answer
195 views

Automator for Saving Attachments

I save MANY attachments from one URL about 50 times a day from clients. I'd like to automate the process for when I click on the download attachment button it will save into 1 specific folder when ...
0
votes
0answers
118 views

move a file, replacing existing (if any), ideally by putting existing in the trash

I am trying to find a way to automatically (without user intervention) move a file from A to B, replacing B if it exists, ideally by putting the existing copy of B into the appropriate Trash folder. ...