text
stringlengths
0
15.7k
source
stringlengths
6
112
log third item in the_result
KeychainParser.applescript
log fourth item in the_result
KeychainParser.applescript
log fifth item in the_result
KeychainParser.applescript
log ">"
KeychainParser.applescript
set the_password_text to (second item in the_result)
KeychainParser.applescript
log "<"
KeychainParser.applescript
log "the_password_text: " & the_password_text
KeychainParser.applescript
set password_result to RegExpUtil's match(the_password_text, "0?x?([0-9A-F]+)?[[:space:]]*\"(.+)\"")
KeychainParser.applescript
if (second item in password_result = "") then --is string-form
KeychainParser.applescript
set the_password to third item in password_result
KeychainParser.applescript
else --is hex-form
KeychainParser.applescript
set hex_pass to second item in password_result
KeychainParser.applescript
log "hex_pass: " & hex_pass
KeychainParser.applescript
set the_password to ShellUtil's hex_to_ascii(hex_pass)
KeychainParser.applescript
log "the_password: " & the_password
KeychainParser.applescript
set the_content to fifth item in the_result --was fourth but apple changed their keychain api in osx 10.11.6
KeychainParser.applescript
log the_content
KeychainParser.applescript
set account_name_result to RegExpUtil's match(the_content, " \"acct\"\\<blob\\>\\=\"([^\"]+)\"")
KeychainParser.applescript
log account_name_result
KeychainParser.applescript
log length of account_name_result
KeychainParser.applescript
log first item in account_name_result
KeychainParser.applescript
set account_name to second item in account_name_result
KeychainParser.applescript
log "account_name:" & account_name
KeychainParser.applescript
return {account_name:account_name, the_password:the_password}
KeychainParser.applescript
end keychain_data
KeychainParser.applescript
on keychain_password(keychain_item_name)
KeychainParser.applescript
set the_result to do shell script "security 2>&1 >/dev/null find-generic-password -gl " & quoted form of keychain_item_name & " | awk '{print $2}'"
KeychainParser.applescript
return (text 2 thru -2 of the_result)
KeychainParser.applescript
end keychain_password
KeychainParser.applescript
on keychain_account()
KeychainParser.applescript
end keychain_account
KeychainParser.applescript
click (button 1 where subrole is "AXZoomButton") of window 1
maximize.scpt
activate application (path to frontmost application as text)
maximize.scpt
property name : "omnifocuslib"
omnifocuslib.applescript
property TAGPRIORITY : {¬ {name: "🗄Next", priority:4}, {name:"Location", priority:3}, {name:"School", priority:2},¬
omnifocuslib.applescript
{name:"Activity", priority:2}, {name:"Difficulty", priority:0},¬
omnifocuslib.applescript
{name:"Importance", priority:-1} }
omnifocuslib.applescript
on getTagPriority()
omnifocuslib.applescript
tell application "Finder" to set dname to container of (path to me) as string
omnifocuslib.applescript
set pfilePath to dname & "omnitagpriorities.plist" as alias
omnifocuslib.applescript
set pfile to property list file pfilePath
omnifocuslib.applescript
return every property list item of pfile
omnifocuslib.applescript
end getTagPriority
omnifocuslib.applescript
set this_item to item i of my_list
omnifocuslib.applescript
else if retrievePriority(this_item) is less than retrievePriority(low_item) then
omnifocuslib.applescript
on retrievePriority(tagItem)
omnifocuslib.applescript
set tagName to name of my getSuperParent(tagItem)
omnifocuslib.applescript
repeat with rec in my TAGPRIORITY
omnifocuslib.applescript
if name of rec is equal to tagName then
omnifocuslib.applescript
return priority of rec
omnifocuslib.applescript
end retrievePriority
omnifocuslib.applescript
on getSuperParent(tagOne)
omnifocuslib.applescript
set nameToLog to name of tagOne
omnifocuslib.applescript
log nameToLog
omnifocuslib.applescript
set tagContainer to container of tagOne
omnifocuslib.applescript
if class of tagContainer is equal to tag then
omnifocuslib.applescript
return my getSuperParent(tagContainer)
omnifocuslib.applescript
return tagOne
omnifocuslib.applescript
end getSuperParent
omnifocuslib.applescript
on getSelectedActions()
omnifocuslib.applescript
end getSelectedActions
omnifocuslib.applescript
on getSettingItem(settingId)
omnifocuslib.applescript
return value of setting id settingId of default document
omnifocuslib.applescript
end getSettingItem
omnifocuslib.applescript
on getDuration(defDuration)
omnifocuslib.applescript
if defDuration is missing value then
omnifocuslib.applescript
set defDuration to 15
omnifocuslib.applescript
set totalDur to 0
omnifocuslib.applescript
repeat with taskOne in my getSelectedActions()
omnifocuslib.applescript
set dur to estimated minutes of taskOne
omnifocuslib.applescript
if dur is missing value then
omnifocuslib.applescript
set dur to defDuration
omnifocuslib.applescript
set totalDur to totalDur + dur
omnifocuslib.applescript
set hrs to totalDur div 60
omnifocuslib.applescript
set mins to totalDur mod 60
omnifocuslib.applescript
return {hrs, mins}
omnifocuslib.applescript
set tableData to {}
Numbers to Calendar - Scrape Speaking Test.applescript
set testInfo to {}
Numbers to Calendar - Scrape Speaking Test.applescript
set columnStart to 3
Numbers to Calendar - Scrape Speaking Test.applescript
set rowStart to 5
Numbers to Calendar - Scrape Speaking Test.applescript
set firstDay to value of cell 2 of column 3
Numbers to Calendar - Scrape Speaking Test.applescript
repeat with columnIndex from columnStart to 10 by 2
Numbers to Calendar - Scrape Speaking Test.applescript
set testDate to value of cell 2 of column columnIndex
Numbers to Calendar - Scrape Speaking Test.applescript
repeat with rowIndex from rowStart to count of rows
Numbers to Calendar - Scrape Speaking Test.applescript
if rowIndex < 9 then
Numbers to Calendar - Scrape Speaking Test.applescript
set eventTime to testDate + (hours * 8) + (minutes * 10)
Numbers to Calendar - Scrape Speaking Test.applescript
else if rowIndex < 13 then
Numbers to Calendar - Scrape Speaking Test.applescript
set eventTime to testDate + (hours * 10) + (minutes * 10)
Numbers to Calendar - Scrape Speaking Test.applescript
else if rowIndex < 14 then
Numbers to Calendar - Scrape Speaking Test.applescript
set eventTime to testDate + (hours * 13) + (minutes * 20)
Numbers to Calendar - Scrape Speaking Test.applescript
else if rowIndex < 18 then
Numbers to Calendar - Scrape Speaking Test.applescript
set eventTime to testDate + (hours * 13) + (minutes * 40)
Numbers to Calendar - Scrape Speaking Test.applescript
set eventTime to testDate + (hours * 15) + (minutes * 20)
Numbers to Calendar - Scrape Speaking Test.applescript
set end of testInfo to {eventTime, value of cell rowIndex of column columnIndex, value of cell rowIndex of column (columnIndex + 1)}
Numbers to Calendar - Scrape Speaking Test.applescript
view calendar at testDate
Numbers to Calendar - Scrape Speaking Test.applescript
tell me to say "Deleting previous Calendars with the word \"Speaking\" in it."
Numbers to Calendar - Scrape Speaking Test.applescript
tell (calendars whose name contains "Speaking")
Numbers to Calendar - Scrape Speaking Test.applescript
create calendar with name "Final Exams - Speaking"
Numbers to Calendar - Scrape Speaking Test.applescript
repeat with info in testInfo
Numbers to Calendar - Scrape Speaking Test.applescript
tell calendar "Final Exams - Speaking"
Numbers to Calendar - Scrape Speaking Test.applescript