New answers tagged

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].


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/...


0

OK so I answer my own question. It is possible to do what I wanted, although I did not find a satisfactory solution. The short answer is: I could find no way to use applescript with the direct manipulation of the graphical interface (eg. clicks). I did find a way by using key alternatives. To do the exact bit of work that I needed, the following sequence ...


0

You can just drag and drop the email from Mail.app into iCal.


0

Try using System Events instead of Finder. I was trying to get every file of a particular extension type in a folder, and kept getting script errors. tell application "System Events" continue with the rest of your code. Hope this helps!


0

As Patrix said try Automator..


0

With the help of javadevg and the answer of AppleScript get active Application, i created the following solution: tell application "Terminal" activate set position of front window to {1, 1} set size of front window to {111, 111} end tell tell application "System Events" set frontmostProcess to first process where it is frontmost set visible of ...


0

There is a way to open a Excel workbook (xlsx, in my example) which is protected either the workbook and/or the sheet. You can use the following script: set passwd to "1234" -- whatever you want set theWbpath to "/Users/xxxxx/Desktop/number1.xlsx" -- example path set theWb to "number1.xlsx" -- example file set theSheet to "sheet1" -- example name of sheet ...


0

Answer from an Apple thread: As of Yosemite, ASObjC is available everywhere, not just libraries and applications. Importing the desired terminology via the use statement is now directly supported in the Script Editor - for your example, the NSString class stuff is available by adding a use framework "Foundation" statement.


-1

I've found the solution. The problem is, that homebrew installed an optional newer version of curl, but the command do shell script does use the old version. After a hint from a friend I used which curl in terminal and apple script editor and get different results: Terminal says: /opt/local/bin/curl Apple Script do shell script says: /usr/bin/curl So the ...


0

There's a simpler solution already built-in. Just open an Archive Utility.app located in /System/Library/CoreServices/Applications/ and change the preferences to use archive format: "Zip archive" Then you can just drag and drop the folders on it's icon in the dock.


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


0

Have a look at https://applescriptlibrary.wordpress.com or use the search engine of your choice. The exact document you ask is here: https://applescriptlibrary.files.wordpress.com/2013/11/open-scripting-architecture.pdf It's listed as legacy and from 2007. See my comment above about carbon API such as this being deprecated when 10.8 Mountain Lion was ...


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.


0

It might be easier to change the user permissions so they can't delete records that the scripts use. Then you can remove the full access from those scripts. Hard to tell without looking over your shoulder or seeing something like a DDR for the database in question.


0

I discovered a workaround. Might not be the best, but the following line executes the JavaScript I have in mind while also setting properties of window: tell front window of application "Google Chrome" set URL of active tab to "javascript:" & window.myVar = "myValue" end tell Using this, myVar properly returns "myValue". Nice.


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.


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

As klanomath stated, it's called script editor, and resides in /applications/utilities If it's not there, simply restarting into recovery and doing a reinstall of the OS should put it back Here are the steps, if you're not certain on how to reinstall OS X: https://support.apple.com/en-us/HT204904


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 ...


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" ...


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 ...


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 "$...


0

adayzdone's suggestion to route output to dev/null also fixed the spinning gear that was appearing when I used Automator to run Firefox profiles. So, something like this in a shell script: /Applications/Firefox.app/Contents/MacOS/firefox-bin -P 'Web Dev' -no-remote &>/dev/null & Thanks!


0

You're close. Get the path to your file by making a one-line script: set the_file to choose file Copy the result of that. Then, in the script that will open the "Fallen_Order_Intro" script, tell the Finder to do the opening for you, pasting in your second script's path, obtained using the "choose file" script. Here's how it would look if your "...



Top 50 recent answers are included