text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
repeat with eachRow from 1 to inputCount as integer | Set crosspoints to current default.applescript |
repeat with eachCol from 0 to outputCount as integer | Set crosspoints to current default.applescript |
set thisLevel to getLevel defaultAudio row eachRow column eachCol | Set crosspoints to current default.applescript |
set rowAdjust to (eachRow - 1) * (outputCount + 1) | Set crosspoints to current default.applescript |
if eachRow is 1 then | Set crosspoints to current default.applescript |
set listPosition to eachCol + 1 | Set crosspoints to current default.applescript |
else if eachRow is greater than or equal to 2 then | Set crosspoints to current default.applescript |
set listPosition to eachCol + rowAdjust + 1 | Set crosspoints to current default.applescript |
util's insertItemInList(thisLevel, Levels, listPosition) | Set crosspoints to current default.applescript |
set defaultAudioID to uniqueID of defaultAudio | Set crosspoints to current default.applescript |
delete cue id defaultAudioID of parent of defaultAudio | Set crosspoints to current default.applescript |
end findDefault | Set crosspoints to current default.applescript |
on setDefault(inputCount, outputCount, cueList, defaultLevels) | Set crosspoints to current default.applescript |
repeat with eachCue in cueList | Set crosspoints to current default.applescript |
set newValue to (item listPosition of defaultLevels) as integer | Set crosspoints to current default.applescript |
setLevel eachCue row eachRow column eachCol db newValue | Set crosspoints to current default.applescript |
end setDefault | Set crosspoints to current default.applescript |
global gDeferDate | Clear Defer Dates.scpt |
set gDeferDate to date "Tuesday, January 1, 2030 at 9:00:00 AM" | Clear Defer Dates.scpt |
set theSel to selected trees | Clear Defer Dates.scpt |
get defer date of theTask | Clear Defer Dates.scpt |
if number of tasks of theTask is 0 then | Clear Defer Dates.scpt |
my setDeferDate(theTask) | Clear Defer Dates.scpt |
log "Task is a parent task; skipping defer date change: " & (get name of theTask) | Clear Defer Dates.scpt |
log "Task has a due date; skipping defer date change: " & (get name of theTask) | Clear Defer Dates.scpt |
properties of theTask | Clear Defer Dates.scpt |
if the (count of theSel) is 1 then | Clear Defer Dates.scpt |
set response to display dialog "Change the defer date of " & (get name of theTask) & " to " & gDeferDate & "?" buttons {"No", "Yes"} default button "Yes" | Clear Defer Dates.scpt |
if the button returned of response is "Yes" then | Clear Defer Dates.scpt |
log "Task already has a defer date: " & (get name of theTask) | Clear Defer Dates.scpt |
on setDeferDate(theTask) | Clear Defer Dates.scpt |
set defer date of theTask to gDeferDate | Clear Defer Dates.scpt |
end setDeferDate | Clear Defer Dates.scpt |
property defaultNoteBook : {} | addnotelink.scpt |
property defaultNoteBookName : "" | addnotelink.scpt |
property beforeNoteBookLength : 0 | addnotelink.scpt |
property defaultNote : {} | addnotelink.scpt |
property listNoteName : {} | addnotelink.scpt |
property maxListLength : 20 | addnotelink.scpt |
if defaultNoteBookName = "" then --デフォルトノートブックの設定 | addnotelink.scpt |
set a to name of notebooks | addnotelink.scpt |
set defaultNoteBookName to choose from list a | addnotelink.scpt |
repeat with t in notebooks | addnotelink.scpt |
if (name of t) as text = (defaultNoteBookName) as text then | addnotelink.scpt |
set defaultNoteBook to t | addnotelink.scpt |
set m to notes of defaultNoteBook | addnotelink.scpt |
set defaultNoteBookLength to length of m | addnotelink.scpt |
if defaultNoteBookLength = beforeNoteBookLength then | addnotelink.scpt |
set listNoteName to {} | addnotelink.scpt |
set resultNote to find notes "notebook:\"" & defaultNoteBookName & "\"" | addnotelink.scpt |
set beforeNoteBookLength to length of resultNote | addnotelink.scpt |
if beforeNoteBookLength > maxListLength then | addnotelink.scpt |
set resultNote to items 1 thru maxListLength of resultNote | addnotelink.scpt |
repeat with i in resultNote | addnotelink.scpt |
set end of listNoteName to title of i | addnotelink.scpt |
set targetNote to choose from list listNoteName | addnotelink.scpt |
if (title of i) as text = targetNote as text then | addnotelink.scpt |
set pasteContents to note link of i as text | addnotelink.scpt |
my copyHTML("<a href=\"" & pasteContents & "\">" & title of i & "</a>") | addnotelink.scpt |
set completion date of todo to (current date) | OpenAndComplete.applescript |
set the_selection to choose from list {1, 2, 3} | Script 16-5.applescript |
set dest_file to choose folder with prompt "Where to save the html file?" | Pandoc-MDtoHTML.applescript |
set theAccountNames to {} | AppleNotesExporter.applescript |
repeat with theAccount in accounts | AppleNotesExporter.applescript |
copy name of theAccount as string to end of theAccountNames | AppleNotesExporter.applescript |
set chosenAccountName to choose from list theAccountNames with prompt "Select the Apple Notes account to export from:" | AppleNotesExporter.applescript |
if chosenAccountName is false then | AppleNotesExporter.applescript |
if name of theAccount as string = chosenAccountName as string then | AppleNotesExporter.applescript |
set chosenAccount to theAccount | AppleNotesExporter.applescript |
set outputFolder to (choose folder with prompt "Choose an output location. Note: Note folder organization structure will be preserved. It is best to use an empty directory." as string) | AppleNotesExporter.applescript |
if outputFolder is false then | AppleNotesExporter.applescript |
repeat with theNote in notes of chosenAccount | AppleNotesExporter.applescript |
set noteLocked to password protected of theNote as boolean | AppleNotesExporter.applescript |
set modDate to modification date of theNote as date | AppleNotesExporter.applescript |
set creDate to creation date of theNote as date | AppleNotesExporter.applescript |
set noteID to id of theNote as string | AppleNotesExporter.applescript |
set theArray to every text item of noteID | AppleNotesExporter.applescript |
if length of theArray > 4 then | AppleNotesExporter.applescript |
set noteID to item 5 of theArray | AppleNotesExporter.applescript |
set noteID to "" | AppleNotesExporter.applescript |
if not noteLocked then | AppleNotesExporter.applescript |
set theText to body of theNote as string | AppleNotesExporter.applescript |
set currentContainer to container of theNote | AppleNotesExporter.applescript |
set internalPath to name of currentContainer | AppleNotesExporter.applescript |
repeat until name of currentContainer as string = name of default account as string | AppleNotesExporter.applescript |
set currentContainer to container of currentContainer | AppleNotesExporter.applescript |
if name of currentContainer as string ≠ name of default account then | AppleNotesExporter.applescript |
set internalPath to (name of currentContainer & "/" & internalPath) | AppleNotesExporter.applescript |
do shell script "mkdir -p '" & (POSIX path of outputFolder as string) & internalPath & "'" | AppleNotesExporter.applescript |
set fileName to ("[" & my replaceText(noteID as string, "p", "") & "] " & (name of theNote as string)) as string | AppleNotesExporter.applescript |
if length of fileName > 250 then | AppleNotesExporter.applescript |
set fileName to text 1 thru 250 of fileName | AppleNotesExporter.applescript |
global outputFolder | AppleNotesExporter.applescript |
set fileNameClean to my replaceText(fileName, ":", "-") | AppleNotesExporter.applescript |
set fileNameClean to my replaceText(fileNameClean, "/", "-") | AppleNotesExporter.applescript |
set fileNameClean to my replaceText(fileNameClean, "$", "") | AppleNotesExporter.applescript |
set fileNameClean to my replaceText(fileNameClean, "\"", "-") | AppleNotesExporter.applescript |
set fileNameClean to my replaceText(fileNameClean, "\\", "-") | AppleNotesExporter.applescript |
set filepath to ((POSIX path of outputFolder as string) & internalPath as string) & "/" & fileNameClean & ".html" | AppleNotesExporter.applescript |
set theFile to open for access filepath with write permission | AppleNotesExporter.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.