text
stringlengths
0
15.7k
source
stringlengths
6
112
reveal document file targetFileHFSpath
fetch-calendar-events.scpt
set theCopy to create PDF document from theURL name theName in (item 1 of theParents) with pagination
As PDF (Paginated).applescript
set missingthing to missing_link_name & return
find missing images.applescript
copy missingthing to the end of missing_link_list
find missing images.applescript
set missing_link_list to missing_link_list as string
find missing images.applescript
display dialog missing_link_list
find missing images.applescript
on delReminder(reminderName)
deleteReminder.scpt
set theName to reminderName
deleteReminder.scpt
set the_reminders to reminders in the_list
deleteReminder.scpt
if name of the_reminder is reminderName then
deleteReminder.scpt
delete the_reminder
deleteReminder.scpt
log "Deleted reminder: " & theName & "."
deleteReminder.scpt
if found is false then
deleteReminder.scpt
log "Error: Could not find a reminder with the name '" & reminderName & "'."
deleteReminder.scpt
end delReminder
deleteReminder.scpt
delReminder(theReminder)
deleteReminder.scpt
set username to word -1 of my findReplace(".scpt", "", (path to me as text))
Switch%20to%20User copy.scpt
do shell script "/System/Library/CoreServices/'Menu Extras'/User.menu/Contents/Resources/CGSession -switchToUserID `id -ur " & username & "`"
Switch%20to%20User copy.scpt
if (do shell script "stat -f %Su /dev/console") is username then exit repeat
Switch%20to%20User copy.scpt
set pswd to (do shell script "security find-generic-password -g -s \"" & username & "\" -D \"User Login\" 2>&1 1>/dev/null | sed -e 's/password: \"//' -e 's/\"//'")
Switch%20to%20User copy.scpt
if exists window 1 of application process "SecurityAgent" then
Switch%20to%20User copy.scpt
tell process "SecurityAgent" to set value of text field 1 of window 1 to pswd
Switch%20to%20User copy.scpt
tell application "SecurityAgent" to quit
Switch%20to%20User copy.scpt
on findReplace(findText, replaceText, sourceText)
Switch%20to%20User copy.scpt
set AppleScript's text item delimiters to findText
Switch%20to%20User copy.scpt
set sourceText to text items of sourceText
Switch%20to%20User copy.scpt
set AppleScript's text item delimiters to replaceText
Switch%20to%20User copy.scpt
set sourceText to sourceText as text
Switch%20to%20User copy.scpt
tell tab group 1 of window "Accounts" of process "System Preferences"
Get User Name.applescript
click radio button 1
Get User Name.applescript
get value of text field 1
Get User Name.applescript
on adding folder items to thisFolder after receiving theseItems
FolderActionsBlock_V1.applescript
set thePath to (path to desktop as Unicode text) & "ThingsToDo.txt"
ExportThingsToTaskPaper.scpt
set thingsToDoFile to (open for access file thePath with write permission)
ExportThingsToTaskPaper.scpt
set eof of thingsToDoFile to 0
ExportThingsToTaskPaper.scpt
set cr to ASCII character 10
ExportThingsToTaskPaper.scpt
write "Inbox:" & return to thingsToDoFile as «class utf8»
ExportThingsToTaskPaper.scpt
repeat with td in to dos of list "Inbox"
ExportThingsToTaskPaper.scpt
set tdName to the name of td
ExportThingsToTaskPaper.scpt
set tdNotes to the notes of td
ExportThingsToTaskPaper.scpt
write tab & "- " & tdName & return to thingsToDoFile as «class utf8»
ExportThingsToTaskPaper.scpt
set fixedNote to my replaceText(cr, "; ", tdNotes)
ExportThingsToTaskPaper.scpt
write tab & tab & fixedNote & return to thingsToDoFile as «class utf8»
ExportThingsToTaskPaper.scpt
write return to thingsToDoFile as «class utf8»
ExportThingsToTaskPaper.scpt
repeat with pr in to dos of list "Projects"
ExportThingsToTaskPaper.scpt
set prName to the name of pr
ExportThingsToTaskPaper.scpt
set prNotes to the notes of pr
ExportThingsToTaskPaper.scpt
write prName & ":" & return to thingsToDoFile as «class utf8»
ExportThingsToTaskPaper.scpt
if prNotes is not "" then
ExportThingsToTaskPaper.scpt
set fixedNote to my replaceText(cr, "; ", prNotes)
ExportThingsToTaskPaper.scpt
write tab & fixedNote & return to thingsToDoFile as «class utf8»
ExportThingsToTaskPaper.scpt
repeat with td in to dos of project prName
ExportThingsToTaskPaper.scpt
write "Someday:" & return to thingsToDoFile as «class utf8»
ExportThingsToTaskPaper.scpt
repeat with td in to dos of list "Someday"
ExportThingsToTaskPaper.scpt
close access thingsToDoFile
ExportThingsToTaskPaper.scpt
global all_documents
import_from_Airmail.scpt
global theGroup
import_from_Airmail.scpt
global theMainRecord
import_from_Airmail.scpt
set all_documents to {}
import_from_Airmail.scpt
set all_documents_urls to {}
import_from_Airmail.scpt
tell application "Airmail 3"
import_from_Airmail.scpt
set x to the count of the selected message
import_from_Airmail.scpt
if x is 0 then
import_from_Airmail.scpt
display alert "Airmail 3" message "There are no messages selected" as warning
import_from_Airmail.scpt
if not (exists current database) then display alert "Airmail 3" message "No database is in use in DevonThink" as warning
import_from_Airmail.scpt
set theGroup to display group selector
import_from_Airmail.scpt
set {theSender, theSubject, theSource} to {the sender, the subject, the htmlContent} of the selected message
import_from_Airmail.scpt
set theURL to the selectedMessageUrl
import_from_Airmail.scpt
set num_of_attachments to the count of mail attachment of the selected message
import_from_Airmail.scpt
if num_of_attachments is greater than 0 then
import_from_Airmail.scpt
repeat until i = num_of_attachments + 1
import_from_Airmail.scpt
set theAttach to filename of mail attachment index i of the selected message
import_from_Airmail.scpt
set theFile to POSIX path of theAttach
import_from_Airmail.scpt
set simple_file to import theFile to theGroup
import_from_Airmail.scpt
set the date of simple_file to current date
import_from_Airmail.scpt
set end of all_documents to simple_file
import_from_Airmail.scpt
set end of all_documents_urls to reference URL of simple_file
import_from_Airmail.scpt
set theBody to "<b>Subject:</b> " & theSubject & "<br>
import_from_Airmail.scpt
<b>From:</b> " & theSender & " <br>
import_from_Airmail.scpt
<hr>
import_from_Airmail.scpt
" & theSource
import_from_Airmail.scpt
repeat with i from 1 to length of all_documents_urls
import_from_Airmail.scpt
set theCurrentListItem to item i of all_documents_urls
import_from_Airmail.scpt
set theBody to (theBody & "<a href=" & theCurrentListItem & ">" & the name of (item i of all_documents) & "</a><br>")
import_from_Airmail.scpt
set theMainRecord to create record with {name:theSubject, source:theBody, type:"html", URL:theURL} in theGroup
import_from_Airmail.scpt
set theRecordUrl to reference URL of theMainRecord
import_from_Airmail.scpt
repeat with i from 1 to length of all_documents
import_from_Airmail.scpt
set theCurrentListItem to item i of all_documents
import_from_Airmail.scpt
set the URL of theCurrentListItem to theRecordUrl
import_from_Airmail.scpt
set osc output enabled of overrides to true
OSC Out Enable.applescript
property pInboxArchiveName : "Archived"
Move old email to archive.applescript
property pSentArchiveName : "ArchivedSent"
Move old email to archive.applescript
property pInboxArchiveDelay : 90
Move old email to archive.applescript
property pSentArchiveDelay : 90
Move old email to archive.applescript
on perform mail action with messages _messages
Move old email to archive.applescript
my archiveMessages()
Move old email to archive.applescript
on logToConsole(_message)
Move old email to archive.applescript
set _logMessage to "[Email Archiving] " & _message
Move old email to archive.applescript
do shell script "/usr/bin/logger -s " & _logMessage's quoted form
Move old email to archive.applescript
end logToConsole
Move old email to archive.applescript