Skip to content

Instantly share code, notes, and snippets.

View fanaugen's full-sized avatar
🙂
always learning

Alex Jahraus fanaugen

🙂
always learning
  • Berlin
View GitHub Profile
@fanaugen
fanaugen / images to TIFF.scpt
Last active October 25, 2018 06:39
Batch-convert images to TIFF (AppleScript, Mac OS X)
# this script converts all PDFs and images selected in Finder
# to the TIFF format and appends .tif to the file name
set t to (time of (current date))
tell application "Finder" to set sel to selection
set errors to {}
tell application "Image Events"
repeat with img_file in sel
try
set img_file to img_file as text
@fanaugen
fanaugen / date string parser.scpt
Last active October 25, 2018 06:41
simple date parser
(*
* Example of a simple string-to-date parser.
* Uses AppleScript's text item delimiters to split the input string
*)
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"-", "T", ":", "Z"}
set dateString to "2011-12-23T08:00:00Z" -- what's Z for?
@fanaugen
fanaugen / workflow.scpt
Last active December 8, 2023 22:06
Automator workflow to batch-convert MS Word documents (.doc, .docx) into PDF using Apple Pages
(*
* embed this applescript into an Automator workflow to batch-convert
* MS Word documents (.doc, .docx) into PDF using Apple Pages.
*)
on run {input, parameters}
tell application "Pages"
activate
repeat with doc in input