Hot answers tagged

6

The AppleScript editor is called Script Editor.app and usually resides in /Applications/Utilities/. If the file was deleted you may get it back by reinstalling it separately with Pacifist by extracting it from "Install OS X El Capitan.app (10.11.0) > InstallESD" and updating it with OS X El Capitan 10.11.5 Combo Update or immediately from "Install OS X El ...


3

Replace your link with this one: itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewRadioStation?id=ra.978194965 You can open it without open your safari. Of course, only works with iTunes installed.


3

The .plist files which are modified by the Accessibility panel are found in ~/Library/Preferences and they are com.apple.CoreGraphics and com.apple.universalaccess. No changes are made to any files in ~/Library/Preferences/ByHost Execute the commands: defaults write com.apple.universalaccess grayscale -bool yes defaults write com.apple.CoreGraphics ...


2

If you want to create an AppleScript application to put in the Dock you can use the following code in OS X Yosemite (and latter, I believe). tell application "System Preferences" activate reveal anchor "Seeing_Display" of pane id "com.apple.preference.universalaccess" end tell tell application "System Events" to tell process "System Preferences" ...


2

I know that this is quite an old post, but I just stumbled upon it from Google while searching for something similar (mostly just wanting to list active fonts via Terminal.) I ended up remembering that activated fonts are listed in System Information which can be pulled from the system_profiler command. That being said here's the command to pull font ...


1

The trick of switching views worked well in Yosemite but no longer in El Capitan. I've had to go back to the simple, yet annoying set newHiddenVisiblesState to "YES" try set oldHiddenVisiblesState to do shell script "defaults read com.apple.finder AppleShowAllFiles" if oldHiddenVisiblesState is in {"1", "YES"} then set ...


1

The first problem can be solved by exporting the path inside the do shell script part: tell application "Finder" activate choose file set myFile to result as text end tell do shell script "export MYFILE=" & quoted form of myFile & " ; /Users/user_name/bin/sh/echo_var_myfile.sh" In my example "echo_var_myfile.sh" is #!/bin/bash echo $...


1

The first problem with the first script is you aren't using the set myFile variable. Here's a general guide to getting help: Open Script editor - use the help menu to launch the AppleScript Language Guide and search for the command you have. In this case "do shell script" That takes you to: https://developer.apple.com/library/prerelease/content/...


1

If you want it to launch at login (which I don't recommend, and I'll explain why), add it to your login options. To do this, open System Preferences -> Users and Groups. Select your name in the sidebar, then select Login Items in the main pane. Next, hit the + button and navigate to wherever you have TardisGlow and hit add. Now it will launch whenever ...


1

activate application "Terminal" tell application "Terminal" set position of front window to {1, 1} set size of front window to {1, 1} end tell tell application "System Events" to keystroke "your message here\rexit\r" Additionally you can get help from AppleScript get active Application to put focus back on original application


1

AppleScript embedded in a shell script is often messy, hard to read, and hard to quote properly. I get around that by using this sort of construct. #!/usr/bin/env bash read -r -d '' applescriptCode <<'EOF' set dialogText to text returned of (display dialog "Query?" default answer "") return dialogText EOF dialogText=$(osascript -e "$...


1

I found it! I tried many different combinations, such as facetimeaudio://[phonenumber] and facetime://audio/[phonenumber], but nothing worked. I was starting to think that there wasn't a way to do this. However, today, I decided to take another crack at it with some different combos, and this one works: facetime-audio://[phonenumber].


1

Try this: set yourpath to ("/YOUR/PATH/HERE/file.ext") as POSIX file do shell script "basename " & quoted form of POSIX path of yourpath This should work for files and folders as well. I used "basename " & quoted form of... because AppleScript and shell script handle spaces in directories quite in a different way, that should allow you to use ...


1

I am unable to comment yet, but there was 1 more tip that helped me. In addition to 0942v8653's answer: For example, if you are using the Script Editor (and possibly the Automator app as well), close and re-open the program. I had added the file outside of the program, so it must not have loaded/recognized the file until I restarted it.



Only top voted, non community-wiki answers of a minimum length are eligible