text
stringlengths
0
15.7k
source
stringlengths
6
112
set alertTitle to "Script complete"
Defer Until Today.scpt
if successTot > 1 then set alertItemNum to "s"
Defer Until Today.scpt
set alertText to successTot & " item" & alertItemNum & " now due today." as string
Defer Until Today.scpt
end main
Defer Until Today.scpt
on startToday(selectedItem, currDate)
Defer Until Today.scpt
set success to false
Defer Until Today.scpt
set originalStartDateTime to defer date of selectedItem
Defer Until Today.scpt
if (originalStartDateTime is not missing value) then
Defer Until Today.scpt
set defer date of selectedItem to (currDate + (time of originalStartDateTime))
Defer Until Today.scpt
set success to true
Defer Until Today.scpt
set defer date of selectedItem to (currDate + (startTime * hours))
Defer Until Today.scpt
return success
Defer Until Today.scpt
end startToday
Defer Until Today.scpt
on dueToday(selectedItem, currDate)
Defer Until Today.scpt
set originalDueDateTime to due date of selectedItem
Defer Until Today.scpt
if (originalDueDateTime is not missing value) then
Defer Until Today.scpt
set originalDueStartDate to originalDueDateTime - (time of originalDueDateTime)
Defer Until Today.scpt
set theDelta to (currDate - originalDueStartDate) / 86400
Defer Until Today.scpt
set newDueDateTime to (originalDueDateTime + (theDelta * days))
Defer Until Today.scpt
set due date of selectedItem to newDueDateTime
Defer Until Today.scpt
set newStartDateTime to (originalStartDateTime + (theDelta * days))
Defer Until Today.scpt
set defer date of selectedItem to newStartDateTime
Defer Until Today.scpt
set due date of selectedItem to (currDate + (dueTime * hours))
Defer Until Today.scpt
end dueToday
Defer Until Today.scpt
on notify(alertName, alertTitle, alertText)
Defer Until Today.scpt
my notifyMain(alertName, alertTitle, alertText, false)
Defer Until Today.scpt
end notify
Defer Until Today.scpt
on notifyWithSticky(alertName, alertTitle, alertText)
Defer Until Today.scpt
my notifyMain(alertName, alertTitle, alertText, true)
Defer Until Today.scpt
end notifyWithSticky
Defer Until Today.scpt
on IsGrowlRunning()
Defer Until Today.scpt
tell application "System Events" to set GrowlRunning to (count of (every process where creator type is "GRRR")) > 0
Defer Until Today.scpt
return GrowlRunning
Defer Until Today.scpt
end IsGrowlRunning
Defer Until Today.scpt
on dictToString(dict) --needed to encapsulate dictionaries in osascript
Defer Until Today.scpt
set dictString to "{" repeat with i in dict if (length of dictString > 1) then set dictString to dictString & ", " set dictString to dictString & "\"" & i & "\"" end repeat set dictString to dictString & "}"
Defer Until Today.scpt
return dictString
Defer Until Today.scpt
end dictToString
Defer Until Today.scpt
on notifyWithGrowl(growlHelperAppName, alertName, alertTitle, alertText, useSticky)
Defer Until Today.scpt
tell my application growlHelperAppName
Defer Until Today.scpt
«event register» given «class appl»:growlAppName, «class anot»:allNotifications, «class dnot»:enabledNotifications, «class iapp»:iconApplication
Defer Until Today.scpt
«event notifygr» given «class name»:alertName, «class titl»:alertTitle, «class appl»:growlAppName, «class desc»:alertText
Defer Until Today.scpt
end notifyWithGrowl
Defer Until Today.scpt
on NotifyWithoutGrowl(alertText)
Defer Until Today.scpt
tell application "OmniFocus" to display dialog alertText with icon 1 buttons {"OK"} default button "OK"
Defer Until Today.scpt
end NotifyWithoutGrowl
Defer Until Today.scpt
on notifyMain(alertName, alertTitle, alertText, useSticky)
Defer Until Today.scpt
set GrowlRunning to my IsGrowlRunning() --check if Growl is running...
Defer Until Today.scpt
if not GrowlRunning then --if Growl isn't running...
Defer Until Today.scpt
set GrowlPath to "" --check to see if Growl is installed...
Defer Until Today.scpt
tell application "Finder" to tell (application file id "GRRR") to set strGrowlPath to POSIX path of (its container as alias) & name
Defer Until Today.scpt
if GrowlPath is not "" then --...try to launch if so...
Defer Until Today.scpt
do shell script "open " & strGrowlPath & " > /dev/null 2>&1 &"
Defer Until Today.scpt
delay 0.5
Defer Until Today.scpt
set GrowlRunning to my IsGrowlRunning()
Defer Until Today.scpt
if GrowlRunning then
Defer Until Today.scpt
tell application "Finder" to tell (application file id "GRRR") to set growlHelperAppName to name
Defer Until Today.scpt
notifyWithGrowl(growlHelperAppName, alertName, alertTitle, alertText, useSticky)
Defer Until Today.scpt
NotifyWithoutGrowl(alertText)
Defer Until Today.scpt
end notifyMain
Defer Until Today.scpt
main()
Defer Until Today.scpt
if application "System Preferences" is running then
Bildschirmblitz.scpt
tell application "System Preferences"
Bildschirmblitz.scpt
set the current pane to pane id "com.apple.preference.universalaccess"
Bildschirmblitz.scpt
reveal anchor "Hearing" of pane id "com.apple.preference.universalaccess"
Bildschirmblitz.scpt
delay 0.10
Bildschirmblitz.scpt
tell window 1 of process "System Preferences"
Bildschirmblitz.scpt
tell (first button whose name is "Bildschirmblitz testen")
Bildschirmblitz.scpt
perform action "AXPress"
Bildschirmblitz.scpt
tell application "Terminal"
keystroke.applescript
activate
keystroke.applescript
tell process "Terminal"
keystroke.applescript
keystroke "f" using {command down, option down}
keystroke.applescript
set upttime to (do shell script "uptime")
uptime.applescript
if upttime is greater than "7 days" then
uptime.applescript
display alert "Restart Your Computer.
uptime.applescript
UP INFO - " & upttime
uptime.applescript
#!/usr/bin/osascript
+utils.applescript
property name : "utils"
+utils.applescript
property id : "chri.sk.applescript.lib:utils"
+utils.applescript
property version : 1.5
+utils.applescript
property parent: AppleScript
+utils.applescript
use framework "Automator"
+utils.applescript
use framework "CoreWLAN"
+utils.applescript
use framework "Foundation"
+utils.applescript
use framework "JavaScriptCore"
+utils.applescript
use scripting additions
+utils.applescript
property parent : script "load.scpt"
+utils.applescript
property this : a reference to current application
+utils.applescript
property nil : a reference to missing value
+utils.applescript
property _1 : a reference to reference
+utils.applescript
property AMWorkflow : a reference to AMWorkflow of this
+utils.applescript
property CWWiFiClient : a reference to CWWiFiClient of this
+utils.applescript
property JSContext : a reference to JSContext of this
+utils.applescript
property NSArray : a reference to NSArray of this
+utils.applescript
property NSBundle : a reference to NSBundle of this
+utils.applescript
property NSDictionary : a reference to NSDictionary of this
+utils.applescript
property NSPredicate : a reference to NSPredicate of this
+utils.applescript
property NSString : a reference to NSString of this
+utils.applescript
property NSURL : a reference to NSURL of this
+utils.applescript