Code Snippets AppleScript

Short texts AppleScript 🧑‍💻 Code snippets AppleScript ✍️ Reading lists AppleScript 👀

Automatically fill in the AP Exam Plagiarism modal!

tell application “2021 Digital AP Exams” activate end tell tell application “System Events” set testSec to “I will not give or receive help during this exam. I will not share or post references to this exam during the testing window. If anyone helps me or if I help them, we will both be investigated.\nMy answers […]

AppleScript to create an application bundle for ICS-51 MARS

set UnixPath to POSIX path of (path to me as text) set jarPath to UnixPath & “mars.jar” set iconPath to UnixPath & “/Contents/Resources/applet.icns” set runMars to UnixPath & “runMars” set unameM to do shell script “uname -m” set unameA to do shell script “uname -a” # Detect architecture if (unameM contains “x86_64”) then if (unameA […]

Look up PDFs on crossref.org in DevonThink

— Look up document metadata on CrossRef.org in DevonThink 3 — — Currently sets: — * Created and Modified dates to the document’s publication date — * Title in document properties — * Author(s) in document properties — * A tag for the type of document — — — To install: — 1. Place this […]

Configure / create VPN connections via applescript

— Author: Michael Bianco — Some help from: http://discussions.info.apple.com/message.jspa?messageID=10363317 on create_vpn_service(vpn_name) tell application “System Preferences” reveal pane “Network” activate tell application “System Events” tell process “System Preferences” tell window 1 click button “Add Service” tell sheet 1 — set location type click pop up button 1 click menu item “VPN” of menu 1 of pop […]

Simple Play and Say.scpt

property defaultSlideDuraton : 2 property pauseBeforeSpeaking : 0 — 1.5 property stoppingStatement : “[[slnc 1000]] Stopping presentation.” — my startRecordScreen tell application “QuickTime Player” activate set newScreenRecording to new screen recording tell newScreenRecording start end tell end tell tell application “Keynote” activate try if not (exists document 1) then error number -128 if playing is […]