text
stringlengths
0
15.7k
source
stringlengths
6
112
log theValues
ASdictionary.applescript
log "iterate through all keys"
ASdictionary.applescript
repeat with k from 1 to lastKey
ASdictionary.applescript
set theKey to item k of theKeys
ASdictionary.applescript
set theValue to valueForKey(theKey)
ASdictionary.applescript
set theValueByIndex to valueForIndex(k)
ASdictionary.applescript
log {theKey, theValue, theValueByIndex}
ASdictionary.applescript
log "remove the key-value pairs"
ASdictionary.applescript
removeValueForKey(item k of theKeys)
ASdictionary.applescript
log "toggleDataIntegrityChecks()"
ASdictionary.applescript
log toggleDataIntegrityChecks()
ASdictionary.applescript
log "setValueForKey(emptyValueList, emptyKeyList)"
ASdictionary.applescript
log setValueForKey({}, {})
ASdictionary.applescript
log "addValuesForKeys(unmatchedValueList, unmatchedKeyList)"
ASdictionary.applescript
log addValuesForKeys({"Kate", "Charlie"}, {"Jean-Paul Cardon", "Bob", "Juliette", "Concierge"})
ASdictionary.applescript
log "keyFound to hasKey(supercalifrajilisticexpialidocious)"
ASdictionary.applescript
set keyFound to hasKey("supercalifrajilisticexpialidocious")
ASdictionary.applescript
log keyFound
ASdictionary.applescript
log "set theValueForKey to valueForKey(supercalifrajilisticexpialidocious)"
ASdictionary.applescript
set theValueForKey to valueForKey("supercalifrajilisticexpialidocious")
ASdictionary.applescript
log theValueForKey
ASdictionary.applescript
log "set dictionaryIsSafe to dictionaryIntegrityCheck(true)"
ASdictionary.applescript
set dictionaryIsSafe to dictionaryIntegrityCheck(true)
ASdictionary.applescript
log dictionaryIsSafe
ASdictionary.applescript
end standard_burn_test
ASdictionary.applescript
on big_data_burn_test()
ASdictionary.applescript
set sourceText to "Lorem ipsum dolor sit amet consectetuer adipiscing elit Aenean commodo ligula eget dolor Aenean massa Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Donec quam felis ultricies nec pellentesque eu pretium quis sem Nulla consequat massa quis enim Donec pede justo fr...
ASdictionary.applescript
set wordCountDictionary to MakeDictionary() of me
ASdictionary.applescript
set wordList to SplitString(sourceText, " ") of me
ASdictionary.applescript
set lastWord to (count wordList)
ASdictionary.applescript
tell wordCountDictionary
ASdictionary.applescript
repeat with thisWord from 1 to lastWord
ASdictionary.applescript
set theWord to item thisWord of wordList
ASdictionary.applescript
set theCount to valueForKey(theWord)
ASdictionary.applescript
if theCount is missing value then
ASdictionary.applescript
setValueForKey(theCount, theWord)
ASdictionary.applescript
my logKeysAndValuesInDictionary(wordCountDictionary)
ASdictionary.applescript
set characterCountDictionary to MakeDictionary() of me
ASdictionary.applescript
tell characterCountDictionary
ASdictionary.applescript
set lastChar to (count sourceText)
ASdictionary.applescript
log {lastChar:lastChar}
ASdictionary.applescript
repeat with thisChar from 1 to lastChar
ASdictionary.applescript
set theChar to item thisChar of sourceText
ASdictionary.applescript
set theCount to valueForKey(theChar)
ASdictionary.applescript
setValueForKey(theCount, theChar)
ASdictionary.applescript
my logKeysAndValuesInDictionary(characterCountDictionary)
ASdictionary.applescript
end big_data_burn_test
ASdictionary.applescript
on logKeysAndValuesInDictionary(dict)
ASdictionary.applescript
set theKeys to getKeysSorted() of dict
ASdictionary.applescript
set theValue to valueForKey(theKey) of dict
ASdictionary.applescript
log {theKey, theValue}
ASdictionary.applescript
end logKeysAndValuesInDictionary
ASdictionary.applescript
on SplitString(theString, TheDelimiter) -- (string, string) as list
ASdictionary.applescript
set theStringList to (every text item in theString) as list
ASdictionary.applescript
return theStringList
ASdictionary.applescript
end SplitString
ASdictionary.applescript
tell application "HazeOver"
HazeOver%20Zen%20Mode.applescript
set myFocusMode to not enabled
HazeOver%20Zen%20Mode.applescript
set enabled to myFocusMode
HazeOver%20Zen%20Mode.applescript
tell dock preferences to set autohide to myFocusMode
HazeOver%20Zen%20Mode.applescript
do shell script "defaults write -g _HIHideMenuBar -bool " & myFocusMode as integer
HazeOver%20Zen%20Mode.applescript
set dnc to current application's NSDistributedNotificationCenter's defaultCenter()
HazeOver%20Zen%20Mode.applescript
dnc's postNotificationName:"AppleInterfaceMenuBarHidingChangedNotification" object:(missing value)
HazeOver%20Zen%20Mode.applescript
set x_pos to {1, 2, 3}
artboard.applescript
set y_pos to reverse of {1, 2, 3, 4}
artboard.applescript
repeat while x <= 3
artboard.applescript
log index of artboard c as text
artboard.applescript
log artboard rectangle of artboard c as text
artboard.applescript
set n to name of artboard c
artboard.applescript
log n as text
artboard.applescript
property name : "sort tags"
sorttags.applescript
set taskTagList to tag of taskOne
sorttags.applescript
set sortedList to reverse of omniLib's simple_sort(taskTagList)
sorttags.applescript
if sortedList is not equal to taskTagList then
sorttags.applescript
remove taskTagList from tag of taskOne
sorttags.applescript
add sortedList to tag of taskOne
sorttags.applescript
set theFile to choose file with prompt "Please select a file:"
Type A File.applescript
set lns to paragraphs of (read file theFile)
Type A File.applescript
tell application "Chrome" to activate
Type A File.applescript
repeat with ln in lns
Type A File.applescript
keystroke ln
Type A File.applescript
keystroke Return
Type A File.applescript
set theDate to (current date) - 20 * minutes
5 Minutes.applescript
set theProject to first flattened project where its name is "theProject"
5 Minutes.applescript
set theTask to every task in theProject where its completed is not true and its estimated minutes is missing value
5 Minutes.applescript
repeat with t in theTask
5 Minutes.applescript
set estimated minutes of t to 5
5 Minutes.applescript
on keychain_data(the_keychain_item_name)
KeychainParser.applescript
log "keychain_data()"
KeychainParser.applescript
set pass_result to (do shell script "2>&1 security find-generic-password -gl " & the_keychain_item_name) --outputs pass and login credentials
KeychainParser.applescript
log pass_result
KeychainParser.applescript
log length of pass_result
KeychainParser.applescript
set wrapped_text to TextParser's wrap_text(pass_result, " ") --wraps the text into one line, replaces linebreaks with a single space char
KeychainParser.applescript
log "wrapped_text: " & wrapped_text
KeychainParser.applescript
set pattern to "password\\: (.+) keychain\\: \"([a-z0-9/.]+)\" version\\: ([0-9]+) class\\: \"genp\" attributes\\:(.+)" --old pattern: "password\\: (.+) keychain\\: \"([a-z0-9/.]+)\" class\\: \"genp\" attributes\\:(.+)"
KeychainParser.applescript
set the_result to RegExpUtil's match(wrapped_text, pattern)
KeychainParser.applescript
log "the_result: " & the_result
KeychainParser.applescript
log "length of result: " & (length of the_result)
KeychainParser.applescript
log second item in the_result
KeychainParser.applescript
log "third"
KeychainParser.applescript