text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell application "Finder" to eject (every disk whose ejectable is true and name does not contain "Box")
|
EjectAllDiscs BigSur.scpt
|
set tmpDir to POSIX path of (path to temporary items from user domain)
|
Execute Perl Script.applescript
|
set tmpDir to tmpDir & "/DEVONthink/_temp_.pl"
|
Execute Perl Script.applescript
|
set this_path to quoted form of tmpDir
|
Execute Perl Script.applescript
|
do shell script "echo " & quoted form of this_source & ">" & this_path
|
Execute Perl Script.applescript
|
do shell script "perl " & this_path
|
Execute Perl Script.applescript
|
set appname to "Network Connect" -------------------------- Set this to the App you want to look at
|
dumpobjects.applescript
|
set winstuff to "defaultval"
|
dumpobjects.applescript
|
set menustuff to "defaultval"
|
dumpobjects.applescript
|
tell application appname
|
dumpobjects.applescript
|
set winstuff to entire contents of front window
|
dumpobjects.applescript
|
set menustuff to entire contents of menu bar 1
|
dumpobjects.applescript
|
return winstuff -- comment this out too to get just menustuff
|
dumpobjects.applescript
|
set omnifocusFocusItem to value of selected trees
|
Publish2Calendar.scpt
|
repeat with thisItem in omnifocusFocusItem
|
Publish2Calendar.scpt
|
set deferDate to defer date of thisItem
|
Publish2Calendar.scpt
|
if estimated minutes of thisItem is not missing value then
|
Publish2Calendar.scpt
|
set estimatedTime to estimated minutes of thisItem
|
Publish2Calendar.scpt
|
set estimatedTime to 60
|
Publish2Calendar.scpt
|
set dueDate to due date of thisItem
|
Publish2Calendar.scpt
|
if note of thisItem is not "" then
|
Publish2Calendar.scpt
|
set eventName to note of thisItem
|
Publish2Calendar.scpt
|
set eventName to name of thisItem
|
Publish2Calendar.scpt
|
set eventStartDate to deferDate
|
Publish2Calendar.scpt
|
set eventEndDate to eventStartDate + estimatedTime
|
Publish2Calendar.scpt
|
set eventURL to "omnifocus:///task/" & (id of thisItem) as string
|
Publish2Calendar.scpt
|
if dueDate is missing value then
|
Publish2Calendar.scpt
|
set dueDate to eventStartDate + (estimatedTime / 60) * hours
|
Publish2Calendar.scpt
|
set theCalendars to title of every calendar
|
Publish2Calendar.scpt
|
set calendarName to item 1 of (choose from list theCalendars with prompt "选择日历" without multiple selections allowed)
|
Publish2Calendar.scpt
|
log calendarName
|
Publish2Calendar.scpt
|
if calendarName is not false then
|
Publish2Calendar.scpt
|
tell calendar calendarName
|
Publish2Calendar.scpt
|
make new event with properties {start date:eventStartDate, end date:dueDate, summary:eventName, url:eventURL}
|
Publish2Calendar.scpt
|
on getNumberInput(promptText, defaultValue)
|
Rename Sequence.applescript
|
if promptText = "" then set promptText to "Enter number:"
|
Rename Sequence.applescript
|
display dialog promptPrefix & promptText default answer defaultValue with icon promptIcon
|
Rename Sequence.applescript
|
set numberValue to text returned of result
|
Rename Sequence.applescript
|
if numberValue = "" then error
|
Rename Sequence.applescript
|
set numberValue to numberValue as number
|
Rename Sequence.applescript
|
return numberValue
|
Rename Sequence.applescript
|
set renameCommand to homeFolder & ".local/bin/rename-seq"
|
Rename Sequence.applescript
|
set startNumber to my getNumberInput("Enter start number:", 1)
|
Rename Sequence.applescript
|
set prefixText to my getInput("Enter prefix:", "")
|
Rename Sequence.applescript
|
set suffixText to my getInput("Enter suffix:", "")
|
Rename Sequence.applescript
|
set numberWidth to my getNumberInput("Enter sequence width (0 = auto):", 0)
|
Rename Sequence.applescript
|
set renameCommand to renameCommand & " -s " & startNumber
|
Rename Sequence.applescript
|
set renameCommand to renameCommand & " -w " & numberWidth
|
Rename Sequence.applescript
|
set renameCommand to renameCommand & " -P " & quoted form of prefixText
|
Rename Sequence.applescript
|
set renameCommand to renameCommand & " -S " & quoted form of suffixText
|
Rename Sequence.applescript
|
set renameCommand to renameCommand & " " & quotePaths(theFiles)
|
Rename Sequence.applescript
|
use script "CalendarLib EC" version "1.1.5" # This external library is for changing time zones of events
|
Apple Numbers to Apple Calendar Version 5.applescript
|
say "Please open the calendar in Apple Numbers first. This script will first delete any calendars that contain the word 'Year' in the calendar name. Please confirm by presing OK"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
display dialog "Please open the calendar in Apple Numbers first. This script will first delete any calendars that contain the word 'Year' in the calendar name. Please confirm by presing OK"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set chosenCalendarApp to "Apple Calendar" # Originally offers to output to Outlook, but got rid of that portion of the script
|
Apple Numbers to Apple Calendar Version 5.applescript
|
say "When is the first day of the semester? Should be on a Monday..."
|
Apple Numbers to Apple Calendar Version 5.applescript
|
display dialog "When is the first day of the semester? (Should be on a Monday, you can enter a delayed start day later)" default answer (date string of theCurrentDate & space & time string of theCurrentDate)
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set firstDay to date theText -- a date object
|
Apple Numbers to Apple Calendar Version 5.applescript
|
say "You entered: " & firstDay & "Please Confirm, by pressing OK"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
display dialog "You entered: " default answer (date string of firstDay & space & time string of firstDay)
|
Apple Numbers to Apple Calendar Version 5.applescript
|
say "When is the last day of the semester?"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
display dialog "When is the last day of the semester?" default answer (date string of theCurrentDate & space & time string of theCurrentDate)
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set theDate to date theText -- a date object
|
Apple Numbers to Apple Calendar Version 5.applescript
|
say "You entered: " & theDate & "Please Confirm, by pressing OK"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
display dialog "You entered: " default answer (date string of theDate & space & time string of theDate)
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set theDate to theDate + (days * 1)
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set a to (year of theDate)
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set b to (month of theDate) as number
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set c to day of theDate
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set e to "FREQ=WEEKLY;INTERVAL=1;BYDAY=;UNTIL="
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set endDate to theDate # this variable represents the last day of the semester
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set theList to {a, b, c}
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set {TID, text item delimiters} to {text item delimiters, "0"}
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set theListAsString to theList as text
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set theList to {e, theListAsString}
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set {TID, text item delimiters} to {text item delimiters, ""}
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set endOfRecurrence to theList as text
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set classNames to {}
|
Apple Numbers to Apple Calendar Version 5.applescript
|
tell me to say "Choose which Numbers document has the timetable and class names."
|
Apple Numbers to Apple Calendar Version 5.applescript
|
tell me to say "Choose the sheet with the timetable."
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set listOfSheets to name of sheets
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set chosenSheet to choose from list listOfSheets
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set chosenSheet to item 1 of chosenSheet
|
Apple Numbers to Apple Calendar Version 5.applescript
|
tell me to say "Getting class names."
|
Apple Numbers to Apple Calendar Version 5.applescript
|
tell sheet chosenSheet
|
Apple Numbers to Apple Calendar Version 5.applescript
|
repeat with columnIndex from 2 to 15
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set yearValue to value of cell 3 of column columnIndex
|
Apple Numbers to Apple Calendar Version 5.applescript
|
if yearValue contains "大一" then
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set yearValue to "Year 1"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
else if yearValue contains "大二" then
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set yearValue to "Year 2"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
repeat with rowIndex from 4 to 37
|
Apple Numbers to Apple Calendar Version 5.applescript
|
if value of cell rowIndex of column columnIndex is not missing value then
|
Apple Numbers to Apple Calendar Version 5.applescript
|
if yearValue & " " & value of cell rowIndex of column columnIndex is not in classNames then
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set end of classNames to yearValue & " " & value of cell rowIndex of column columnIndex
|
Apple Numbers to Apple Calendar Version 5.applescript
|
tell me to say "Grabbing data from the numbers spreadsheet."
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set roomIndex to first cell whose value is "Room"
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set columnNumber to address of column of roomIndex
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set rowNumber to address of row of roomIndex
|
Apple Numbers to Apple Calendar Version 5.applescript
|
set rowCount to count of cells in column columnNumber
|
Apple Numbers to Apple Calendar Version 5.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.