Skip to content

Instantly share code, notes, and snippets.

@helmuthauser
helmuthauser / Presentation_Mode_On_Apple_Script
Last active August 11, 2018 20:55
Work Smart and be Remarkable
# Script to prepare the laptop for a presentation
# It switches off all unneccesary applications, mute volume and switches on Caffeine
#
# Make sure you have also switched on "Do not disturb" for
# "when mirroring to TVs and projectors" (in Preferences/Notification)
#
# Latest update: August 3, 2015
# work.smart.and.be.remarkable@gmail.com
# www.helmuthauser.com
@helmuthauser
helmuthauser / Presentation_Mode_off
Last active August 29, 2015 14:08
switches to presentation mode off
# Script to switch on again all needed applications after the presentation
#
# Latest update: October 27, 2014
# work.smart.and.be.remarkable@gmail.com
# www.helmuthauser.com
set question to display dialog "Ready to switch off presenation mode?" buttons {"Yes", "Cancel"} default button 1
set answer to button returned of question
-- original file downloaded From: http://c-command.com/scripts/omnifocus/defer-to-tomorrow
-- augmented code orginally from Ben Waldie
-- https://gist.github.com/benwaldie/4583391
-- ========================================
-- Script to defer Omnifocus task to
-- a defined date
-- ========================================
-- if you want adapt the script to another date and/or time
-- check function "myDeferDate" at the end of this script
-- see comments there
# Helmut Hauser
# http://www.worksmartandberemarkable.com
# March 19, 2016
# code from http://hints.macworld.com/article.php?story=20070730101510623
# get the number of characters, word
set numCharacters to count (the clipboard)
set numWords to count words of (the clipboard)
set numParagraphs to count paragraphs of (the clipboard)
@helmuthauser
helmuthauser / change_num_of_days_in_Calendar
Last active January 13, 2017 13:22
change_number_of_days_in_Calendar_week_view
# to change the the number of days shown in the week view
# change the number in line 4 after the work "week"
tell application "Calendar" to quit
do shell script ("defaults write com.apple.iCal n\\ days\\ of\\ week 10")
tell application "Calendar" to activate
@helmuthauser
helmuthauser / Defer_OF_tasks_to_random_date
Created January 17, 2017 08:58
AppleScript that defers highlighted tasks in Omnifocus to random date in the future (like in the iOS version of Omnifocus)
--
-- based on a script originally file downloaded from:
-- http://c-command.com/scripts/omnifocus/defer-to-tomorrow
--
-- ========================================
-- Script to defer Omnifocus task to
-- random date in the future (emulation of "defer to random date" from iOS version
-- ========================================
-- It chooses a random number of days ranging from 14 to 90 days and adds to today's date
-- NB: That's the same values Omnifocus uses in their iOS version