text
stringlengths
0
15.7k
source
stringlengths
6
112
if (templateVars[cleanName]) { var stringArray = []; for (var i = 0 ; i < templateVars[cleanName].length ; i++) { replaceVars(replace(string, stringVars[0], templateVars[cleanName][i])); }
projFromTemplate.applescript
replaceVars(replace(string, stringVars[0], "undefined"));
projFromTemplate.applescript
// TODO When template file does not define a variable, prompt via dialog
projFromTemplate.applescript
* Replace all instances of a substring in a string
projFromTemplate.applescript
* @method replace
projFromTemplate.applescript
* @param {string} oldStr - substring to replace
projFromTemplate.applescript
* @param {string} newStr - replacement substring
projFromTemplate.applescript
* @return {string} updated string
projFromTemplate.applescript
function replace(string, oldStr, newStr) { while (string.includes(oldStr)) { string = string.replace(oldStr, newStr); }
projFromTemplate.applescript
return string;
projFromTemplate.applescript
* Prase creates a new task immediately in the default OF document.
projFromTemplate.applescript
* @method OFparse
projFromTemplate.applescript
* @param {string} string - String to parse as task
projFromTemplate.applescript
* @return {object} Omnifocus task object
projFromTemplate.applescript
* @example
projFromTemplate.applescript
* OFparse('Do Something! @work ::misc project #4pm #tomorrow //Note')
projFromTemplate.applescript
* First # is deferred date, 2nd # is due date. If only one specified it is used as due date
projFromTemplate.applescript
function OFparse(string) { return OF.parseTasksInto(OFdoc, {withTransportText: string});
projFromTemplate.applescript
set pre to "AM"
Speak-Time.scpt
set myHour to hours of (current date)
Speak-Time.scpt
set myMinutes to minutes of (current date)
Speak-Time.scpt
if (myHour ≥ 12) then
Speak-Time.scpt
set myHour to (myHour - 12)
Speak-Time.scpt
set pre to "PM"
Speak-Time.scpt
set mySpeak to myHour & " " & myMinutes & "" & pre
Speak-Time.scpt
say "The time is now " & mySpeak
Speak-Time.scpt
set theNotes to {}
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
set theName to "\"" & name of theTag & "\""
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
set theNotes to (find notes "tag:" & theName)
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
if (count of theNotes) is 1 then
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
copy ((name of theTag) & ": " & "<a href='" & (note link of (first item of theNotes)) & "'>" & (title of (first item of theNotes)) & "</a>") to the end of output
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
set sortedTags to my simple_sort(output)
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
set AppleScript's text item delimiters to "<br>"
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
set articleList to sortedTags as text
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
set o to create note with html articleList title "Single-note tags"
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
open note window with o
Evernote%20-%20List%20tags%20that%20have%20a%20single%20note.scpt
tell account "Flybynight.net"
Script 21-5.applescript
tell mailbox "INBOX"
Script 21-5.applescript
set address_list to sender of every message
Script 21-5.applescript
set dir to "~/test"
do shell script "wget -P".applescript
set cmd to "/usr/local/bin/wget -P " & quoted form of dir & " " & quoted form of uri
do shell script "wget -P".applescript
property pDestination : "/Nature's News"
Hubble News.applescript
property pTopics : {"Hubble"}
Hubble News.applescript
property pURL : "https://www.nature.com/news"
Hubble News.applescript
show progress indicator "Checking latest news..." steps -1
Hubble News.applescript
with timeout of 60 seconds
Hubble News.applescript
set this_HTML to download markup from pURL
Hubble News.applescript
set these_links to {}
Hubble News.applescript
repeat with this_topic in pTopics
Hubble News.applescript
set these_links to these_links & (get links of this_HTML containing this_topic base URL pURL)
Hubble News.applescript
if these_links is {} then error "No news found."
Hubble News.applescript
show progress indicator "Adding news..." steps (count of these_links)
Hubble News.applescript
set news_added to false
Hubble News.applescript
if not (exists record with URL this_link) then
Hubble News.applescript
set this_news to download markup from this_link
Hubble News.applescript
set this_title to get title of this_news
Hubble News.applescript
step progress indicator this_title
Hubble News.applescript
if not news_added then
Hubble News.applescript
set news_added to true
Hubble News.applescript
create record with {name:this_title, type:html, URL:this_link, source:this_news} in this_group
Hubble News.applescript
if not news_added then error "No news found."
Hubble News.applescript
set cancelButton to get first button of window 1 whose name is "Cancel"
fmGUI_ObjectClick_AffectsWindow.applescript
fmGUI_ObjectClick_AffectsWindow(cancelButton)
fmGUI_ObjectClick_AffectsWindow.applescript
on fmGUI_ObjectClick_AffectsWindow(buttonRef)
fmGUI_ObjectClick_AffectsWindow.applescript
my clickObjectByCoords(buttonRef)
fmGUI_ObjectClick_AffectsWindow.applescript
end fmGUI_ObjectClick_AffectsWindow
fmGUI_ObjectClick_AffectsWindow.applescript
tell application "htcLib" to clickObjectByCoords(someObject)
fmGUI_ObjectClick_AffectsWindow.applescript
reveal item showdisknumber of theList
Reveal eDisk in Finder with Filter.applescript
set current_dir to item 1 of argv
dev.scpt
set rails_session to current session
dev.scpt
set current_tab to current tab
dev.scpt
write text "bundle exec rails server --binding=127.0.0.1 --port 3000"
dev.scpt
set sidekiq_session to split horizontally with default profile
dev.scpt
tell sidekiq_session to select
dev.scpt
write text "cd " & current_dir
dev.scpt
write text "bundle exec sidekiq"
dev.scpt
set client_session to split vertically with default profile
dev.scpt
tell client_session to select
dev.scpt
write text "cd " & current_dir & "/client"
dev.scpt
write text "yarn run build:development"
dev.scpt
if count of tabs is 1 then
dev.scpt
set new_tab to create tab with default profile
dev.scpt
tell current session of new_tab
dev.scpt
write text "rails console"
dev.scpt
tell current session of new_tab to write text "cd " & current_dir
dev.scpt
tell current_tab to select
dev.scpt
tell rails_session to select
dev.scpt
property todayStr : "Today"
Rebalance.applescript
property missingContextStr : "<empty>" -- string when context is missing
Rebalance.applescript
property barStr : "--" -- BAR string after header
Rebalance.applescript
property preStr : "?" & tab -- PRESTRING prior to each list item
Rebalance.applescript
property actGroupStr : "Project Group" -- pre-string when task is action group (shows when expandGroup = false)
Rebalance.applescript
property sepStr : " : " -- SEPARATOR string between context and task
Rebalance.applescript
log "STARTED Rebalancing"
Rebalance.applescript
set nowHours to hours of nowDate
Rebalance.applescript
set todaysTasks to (flattened tasks where completed is false and ((defer date ? todayDate and defer date < tomorrowDate) or (due date ? todayDate and due date < tomorrowDate)))
Rebalance.applescript
set maxNumReadingTasks to 2
Rebalance.applescript
set currentNumReadingTasks to 0
Rebalance.applescript
set maxNumVideoTasks to 1
Rebalance.applescript
set currentNumVideoTasks to 0
Rebalance.applescript