text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
end null_or_datetime
|
export.scpt
|
on null_or_string(content)
|
export.scpt
|
if content is equal to missing value then
|
export.scpt
|
return "\"" & content of me & "\""
|
export.scpt
|
end null_or_string
|
export.scpt
|
set todolists to every list
|
export.scpt
|
repeat with i from 1 to length of todolists
|
export.scpt
|
set todolist to item i of todolists
|
export.scpt
|
set todos to reminders of todolist
|
export.scpt
|
set output to output & "{"
set output to output & "\"id\": \"" & (get id of todolist) & "\", "
set output to output & "\"name\": \"" & (get name of todolist) & "\", "
set output to output & "\"todos\": ["
repeat with j from 1 to length of todos
set todo to item j of todos
set title to replace_chars(name of todo, "\"", "\\\"") of me
set output to output & "{"
set output to output & "\"id\": \"" & (get id of todo) & "\","
set output to output & "\"title\": \"" & title & "\","
set output to output & "\"body\": " & null_or_string(body of todo) of me & ","
set output to output & "\"priority\": " & (get priority of todo) & ","
set output to output & "\"completed\": " & (get completed of todo) & ","
set output to output & "\"created_at\": " & null_or_datetime(creation date of todo) of me & ","
set output to output & "\"updated_at\": " & null_or_datetime(modification date of todo) of me & ","
set output to output & "\"completed_at\": " & null_or_datetime(completion date of todo) of me & ","
set output to output & "\"due_date\": " & null_or_datetime(due date of todo) of me & ","
set output to output & "\"remind_date\": " & null_or_datetime(remind me date of todo) of me
set output to output & "}"
|
export.scpt
|
if j is not length of todos then
|
export.scpt
|
set output to output & ", "
|
export.scpt
|
set output to output & "]"
|
export.scpt
|
set output to output & "}"
|
export.scpt
|
if i is not length of todolists then
|
export.scpt
|
set output to "[" & output & "]"
|
export.scpt
|
tell application "DEVONagent"
|
Add Downloads.applescript
|
if not (exists browser 1) then error "No browser windows are open."
|
Add Downloads.applescript
|
set theSource to source of browser 1
|
Add Downloads.applescript
|
set theURL to URL of browser 1
|
Add Downloads.applescript
|
set theLinks to get links of theSource base URL theURL containing "Download"
|
Add Downloads.applescript
|
repeat with theLink in theLinks
|
Add Downloads.applescript
|
add download theLink
|
Add Downloads.applescript
|
if the error_number is not -128 then display alert "DEVONagent" message error_message as warning
|
Add Downloads.applescript
|
on run {note_name, attachment_path}
|
attachment_append.applescript
|
append (item 1 of note_found) attachment (attachment_path as POSIX file)
|
attachment_append.applescript
|
on showError(msg)
|
Open current location in DEVONthink.applescript
|
display dialog msg buttons {"OK"} default button 1 with icon 0
|
Open current location in DEVONthink.applescript
|
end showError
|
Open current location in DEVONthink.applescript
|
on getWebPageData()
|
Open current location in DEVONthink.applescript
|
set status to "OK"
|
Open current location in DEVONthink.applescript
|
set frontApp to item 1 of (get name of processes whose frontmost is true)
|
Open current location in DEVONthink.applescript
|
if (frontApp = "Safari") then
|
Open current location in DEVONthink.applescript
|
set theTitle to get name of the current tab of the front window
|
Open current location in DEVONthink.applescript
|
set theURL to get URL of the current tab of the front window
|
Open current location in DEVONthink.applescript
|
else if (frontApp = "Google Chrome") then
|
Open current location in DEVONthink.applescript
|
set theTitle to get title of the active tab of the front window
|
Open current location in DEVONthink.applescript
|
set theURL to get URL of the active tab of the front window
|
Open current location in DEVONthink.applescript
|
set status to "Don't know how to get the URL from " & frontApp & "."
|
Open current location in DEVONthink.applescript
|
set status to "Could not obtain info from " & frontApp & "."
|
Open current location in DEVONthink.applescript
|
return {status, theURL, theTitle}
|
Open current location in DEVONthink.applescript
|
end getWebPageData
|
Open current location in DEVONthink.applescript
|
tell application "DEVONthink 3" to launch
|
Open current location in DEVONthink.applescript
|
set {status, theURL, theTitle} to my getWebPageData()
|
Open current location in DEVONthink.applescript
|
if status as string is equal to "OK" then
|
Open current location in DEVONthink.applescript
|
set theGroup to preferred import destination
|
Open current location in DEVONthink.applescript
|
set theBookmark to create record with {name:theTitle, type:bookmark, URL:theURL} in theGroup
|
Open current location in DEVONthink.applescript
|
open window for record theBookmark
|
Open current location in DEVONthink.applescript
|
my showError(status)
|
Open current location in DEVONthink.applescript
|
set message to execute the_tab javascript "document.querySelector('.eL-cd.mQ[aria-live=\"polite\"]').innerHTML"
|
focus_window.applescript
|
display notification message with title "Google Hangouts"
|
focus_window.applescript
|
say message
|
focus_window.applescript
|
select row 5 of table 1 of scroll area 1
|
Enable Colour Filter.applescript
|
click radio button "Colour Filters" of tab group 1 of group 1
|
Enable Colour Filter.applescript
|
click checkbox "Enable Colour Filters" of tab group 1 of group 1
|
Enable Colour Filter.applescript
|
tell application "Finder" to empty trash
|
Empty Trash.applescript
|
played date
|
firstscript.applescript
|
set listName to "Safari Tabs on " & the dateStamp
|
Save Open Safari Tabs to Reminders.applescript
|
set safariWindow to the front window
|
Save Open Safari Tabs to Reminders.applescript
|
set tabCount to (count of (tabs of safariWindow))
|
Save Open Safari Tabs to Reminders.applescript
|
tell application "Reminders" to set theList to (make new list with properties {name:listName})
|
Save Open Safari Tabs to Reminders.applescript
|
tell theList
|
Save Open Safari Tabs to Reminders.applescript
|
make new reminder with properties {name:TabTitle, body:TabURL}
|
Save Open Safari Tabs to Reminders.applescript
|
display notification "No Tabs Exported!" with title "Send Safari Tabs to Reminders" subtitle "◸ Veritrope.com"
|
Save Open Safari Tabs to Reminders.applescript
|
" Tab to Reminders" with title "Send Safari Tabs to Reminders" subtitle "◸ Veritrope.com"
|
Save Open Safari Tabs to Reminders.applescript
|
" Tabs to Reminders" with title "Send Safari Tabs to Reminders" subtitle "◸ Veritrope.com"
|
Save Open Safari Tabs to Reminders.applescript
|
set message to "'" & track_name & "' by " & track_artist & " on '" & track_album & "' - http://open.spotify.com/track/" & track_id
|
current_track.scpt
|
set theType to type of theRecord
|
Export to Bookends.applescript
|
if theType is not group and theType is not smart group and theType is not feed then
|
Export to Bookends.applescript
|
set thePath to path of theRecord
|
Export to Bookends.applescript
|
if thePath is not "" and thePath does not contain "/Documents/Bookends/Attachments" then
|
Export to Bookends.applescript
|
set theNote to comment of theRecord
|
Export to Bookends.applescript
|
set theDate to creation date of theRecord
|
Export to Bookends.applescript
|
set theYear to (year of theDate) as string
|
Export to Bookends.applescript
|
set theCustomMD to custom meta data of theRecord
|
Export to Bookends.applescript
|
set {theAuthors, theKeywords, theDOI, thePMID, theISBN, thePublisher, theJournal, theVolume, thePages} to {"", "", "", "", "", "", "", "", ""}
|
Export to Bookends.applescript
|
set theAuthors to my metaDataItems(|kMDItemAuthors| of theMD)
|
Export to Bookends.applescript
|
set theKeywords to my metaDataItems(|kMDItemKeywords| of theMD)
|
Export to Bookends.applescript
|
if theKeywords is "" then
|
Export to Bookends.applescript
|
set theKeywords to tags of theRecord
|
Export to Bookends.applescript
|
set theKeywords to (theKeywords as string)
|
Export to Bookends.applescript
|
set theDOI to mddoi of theCustomMD
|
Export to Bookends.applescript
|
set thePMID to mdpmid of theCustomMD
|
Export to Bookends.applescript
|
set thePublisher to mdpublisher of theCustomMD
|
Export to Bookends.applescript
|
set theJournal to mdjournal of theCustomMD
|
Export to Bookends.applescript
|
set theVolume to mdvolume of theCustomMD
|
Export to Bookends.applescript
|
set thePages to mdpage of theCustomMD
|
Export to Bookends.applescript
|
deconsolidate record theRecord to "~/Documents/Bookends/Attachments"
|
Export to Bookends.applescript
|
set theFilename to text item -1 of (path of theRecord as string)
|
Export to Bookends.applescript
|
tell front library window to make new publication item with properties {title:theName, url:theURL, notes:theNote, keywords:theKeywords, authors:theAuthors, pmid:thePMID, doi:theDOI, isbn:theISBN, publication date string:theYear, publisher:thePublisher, journal:theJournal, volume:theVolume, pages:thePages, attachments:theFilename}
|
Export to Bookends.applescript
|
on metaDataItems(theString)
|
Export to Bookends.applescript
|
if theString is not missing value and theString is not "" then
|
Export to Bookends.applescript
|
local od, theItems
|
Export to Bookends.applescript
|
set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "," & (ASCII character 10)}
|
Export to Bookends.applescript
|
set theItems to text items of theString
|
Export to Bookends.applescript
|
set theString to (theItems as string)
|
Export to Bookends.applescript
|
end metaDataItems
|
Export to Bookends.applescript
|
tell application "Adobe Photoshop CC 2017"
|
ps_make_new_layer.scpt
|
set docRef to current document
|
ps_make_new_layer.scpt
|
set layerName to name of current layer as string
|
ps_make_new_layer.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.