Questions tagged [applescript]

AppleScript is a proprietary programming language in macOS to control and exchange data with applications.

285 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

Any way to delete the app once it was opened ?

I just created an app (Let's say Test1) with AppleScript. It's used to activate another app (Let's say Test2). What I want to do is to delete Test1 or move Test1 to Trash, once Test2 was launched. ...
0
votes
0answers
371 views

Extension : Multi-highlight on safari

I'm not sure this topic is appropriate for this forum but I'm looking for a Multi-highlight extension or AppleScript for Safari. I using Multi-highlight for Google Chrome at the moment but I would ...
0
votes
0answers
147 views

AppleScript not putting Mac to sleep

I have this chunk of code: on run delay 10 set lidState to do shell script "ioreg -r -k AppleClamshellState | awk -F \" = \" '/AppleClamshellState/ {print $2}'" if lidState = "Yes" then ...
0
votes
0answers
122 views

Is it possible to simulate a continuos press in AppleScript?

The closest solution to a continuous key press that I know is just repeating a key press a certain number of times: repeat 1000 times tell application "System Events" to keystroke "c" using ...
0
votes
0answers
38 views

AppleScript Automator back-compatibility

I made a little, easy AppleScript and used Automator to launch it on click: tell application "Terminal" do script "myScript" end tell What about back-compatibility? Can I run it on every previous ...
0
votes
0answers
529 views

How to repair a corrupt Applescript Editor

I have an applescript that I've been working on the past week or so. I've been running & rerunning a script, fixing bugs, etc. that are deep in the code. Sometimes, the script would take a ...
0
votes
0answers
132 views

Execute macros or scripts based on Magic Trackpad 2 Force Touch

I’m looking at getting a Magic Trackpad 2 with Force Touch, but want to know if I can create macros for the Force Touch actions? I’m not taking about the the built in basic Apple support, but full on ...
0
votes
0answers
136 views

Look Up - AppleScript command

Is there an apple script command for the "Look Up" action/service? If not, what would be a decent way to mimic it? If you don't know what I'm talking about it's the popover when you three-finger ...
0
votes
0answers
2k views

Unmute audio input (microphone) in OSX programatically

OSX 10.10.3, also reproducible on 10.8, doesn't seem to happen on 10.11 Reproduction steps Go to System preferences > Audio > Input Set input volume to 0 (this is important) Run this script in ...
0
votes
0answers
484 views

AppleScript & Notes App

Is it possible to use AppleScript to change the font in the Notes App? I am not very familiar with AppleScript, so I may have missed something, but my attempts to change the font have failed. The ...
0
votes
0answers
544 views

Launchd Applescript Timeout Error

On Yosemite 10.10.5, I have an Apples Script application that runs and completes as desired under 2 of 3 conditions. The application is set to launch, by launchd plist 3 times per day at 7:05am, 3:...
0
votes
0answers
337 views

Open Word Doc with Pages using Applescript

How can I get the following to work in Pages? I get an error message saying the file can't be opened but if I change the path to a .pages file it works fine. tell application "Pages" activate ...
0
votes
0answers
160 views

Replace iTunes playcount with previous library using Applescript loop

After updating my iTunes library to iCloud, the play count of some has been messed up. I was thinking of fixing the missing data by using an Apple Script loop. The loop should scan the playcount of ...
0
votes
0answers
317 views

UNIX Script to Change Desktop & Screensaver in 10.8

I'm setting up LaunchAgent .plists that start up UNIX bash scripts to automatically change the desktop and screensaver for various different users for a Mac image that will be deployed to multiple Mac ...
0
votes
0answers
385 views

Clean up of calendar event before/during duplication

This issue all stems from duplicating events from subscribed calendars to a single iCloud calendar I share with someone. When the origin calendar is well structured everything works as expected. My ...
0
votes
0answers
121 views

Automator action keeps failing

I would like to have a very simple Automator action that watches my photo upload folder in Dropbox and moves every file that it receives into another folder on my desktop. Sometimes it works perfectly,...
0
votes
0answers
503 views

Applescript and iTunes: enable shuffle by song or album and play?

The documentation for shuffle/shufflable in the iTunes Applescript dictionary is really confusing, at least for me. As I read it shuffle seems to be a property of a playlist (not a state of the ...
0
votes
0answers
330 views

Using automator, sort objects by type into type folders, inside subfolders

long time no ask! Anyway, I've been tasked with a project that involves sorting folders into new folders based on type. I've been working on an Automator action, but I haven't had much success. What I'...
0
votes
0answers
285 views

Changing app icon in order to change mini window icon

I have an app bundle on my desktop. I change its icon by changing the icon in its /Contents/Resources/ folder. This updates finder. However I am trying to update the dock. I have figured I can ...
0
votes
0answers
472 views

Automator sequential renaming for one file at a time

I have found many tutorials on how to rename some files using a "batch-renaming" type of workflow, but I have a different issue. I'm moving files one at a time into a folder, not all at once, so the ...
0
votes
0answers
630 views

how to exporting outlook 2011 calendar event using applescript

i try to exporting selected outlook calendar event using apple script but get an error: error : microsoft Outlook got an error : can't make vevent of calendar event id 5680 into type specifier ...
0
votes
0answers
625 views

Adding alarms to a calendar entry using AppleScript in Mavericks causes error

I have following scripts (see bottom) that is meant to open all calendar entries and create alarms for each. This is working fine on 10.8.x. I've been testing the same script on Mavericks and I'm ...
0
votes
0answers
337 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.
0
votes
1answer
35 views

Applescript refer a link to a file in current finder window

Edited. Where is my current script : set plistfile_path to POSIX file "/users/moi/Desktop/Time/" choose file with prompt "Please choose a file:" of type {"plist"} ¬ default location ...
0
votes
1answer
89 views

Running AppleScript without activating the window

I have a python script to read from Messages database and forward some specific new messages to specific contacts. It works but the AppleScript below to send message is making Messages.app appear. I ...
0
votes
1answer
170 views

Open two applications in full spit screen using Bash script

I am trying to write a Bash script to open two applications in full split screen, for example: #!/bin/bash LESSON="$1" echo operating on lesson $LESSON open /Applications/Pages.app /Users/username/...
0
votes
1answer
254 views

Can I use AppleScript to paste a web text clip appended with source attribution and a timestamp, while maintaining embedded links?

Complete newbie here so please let me know if I need to clarify or otherwise improve my question. I have searched multiple times using different keywords and have not been able to find a solution to ...
0
votes
1answer
151 views

AppleScript saving global variable

I'd like to access the variables origTrack and origPlaylist from another AppleScript so that I can return to the track and playlist that were playing before the first script executed. Here's what I ...
0
votes
1answer
1k views

Problem “do shell script” on curl – Works in Terminal, but not via “do shell script”

I want to use "curl" with "do shell script" in an apple script. It already worked some months ago, but then the provider changed to https-only service. So I update curl on Mac OS Terminal: $ curl -V ...
0
votes
1answer
226 views

Using the option key in Apple Script.

I am working on a script that puts in strings of text into a document, and I was wondering how you would have apple script input the keystroke "Option-Return"
0
votes
1answer
83 views

AppleScript runs twice?

This script should say a b just once but many times it says a b a b. I think this has something to do with Saved application stage. I emptied Saved application stage folder for this script then ...
0
votes
1answer
2k views

How can I use Automator to open a website & log in everyday at a certain time?

I need to set up an auto log in for an Intranet web site so I can get right to work with no delays. I want Automator to open safari, go to the page, input log in and password credentials and hit log ...
0
votes
2answers
43 views

How to drag folders from Finder into Final Cut without mouse [automator/applescript]

Hello guys I'm trying to create a Service to do some repetitive tasks that I have to perform every day. Most of the things I figured out how to automate, but there is one move that seems to be ...
0
votes
1answer
220 views

Run script/ifttt recipe… upon notification

Either this is impossible, or google is failing me. Ultimately, what I would like to do is push system notifications from my Mac to my iOS device. Google only gives me 1000's of hits for going the ...
-1
votes
0answers
34 views

AppleScript to window in another Space?

I'm trying to adapt an AppleScript that is using System Events, based on calling the front window of the application I want to control. The script is working okay if the application is in the same ...