text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set company of this_contact to "Universiteit Utrecht"
|
UpdateContacts.applescript
|
set business city of this_contact to "Utrecht"
|
UpdateContacts.applescript
|
else if (company of this_contact = "VU") then
|
UpdateContacts.applescript
|
set company of this_contact to "Vrije Universiteit"
|
UpdateContacts.applescript
|
set business city of this_contact to "Amsterdam"
|
UpdateContacts.applescript
|
else if (company of this_contact = "KB") then
|
UpdateContacts.applescript
|
set company of this_contact to "Koninklijke Bibliotheek"
|
UpdateContacts.applescript
|
set business city of this_contact to "Den Haag"
|
UpdateContacts.applescript
|
else if (company of this_contact = "UvA") then
|
UpdateContacts.applescript
|
set company of this_contact to "Universiteit van Amsterdam"
|
UpdateContacts.applescript
|
else if (company of this_contact = "RUG") then
|
UpdateContacts.applescript
|
set company of this_contact to "Rijksuniversiteit Groningen"
|
UpdateContacts.applescript
|
set business city of this_contact to "Groningen"
|
UpdateContacts.applescript
|
else if (company of this_contact = "UvT") then
|
UpdateContacts.applescript
|
set company of this_contact to "Universiteit van Tilburg"
|
UpdateContacts.applescript
|
set business city of this_contact to "Tilburg"
|
UpdateContacts.applescript
|
log job title of this_contact as string
|
UpdateContacts.applescript
|
if (job title of this_contact is in job_titles) then
|
UpdateContacts.applescript
|
set title of this_contact to job title of this_contact
|
UpdateContacts.applescript
|
set job title of this_contact to ""
|
UpdateContacts.applescript
|
set value of slider 1 of tab group 1 of window 1 of process "System Preferences" to 0.5
|
dis50.applescript
|
set state to do shell script "defaults read com.apple.finder AppleShowAllFiles" as string
|
ToggleHiddenFiles.scpt
|
if state is "OFF" then
|
ToggleHiddenFiles.scpt
|
do shell script "defaults write com.apple.finder AppleShowAllFiles ON"
|
ToggleHiddenFiles.scpt
|
do shell script "defaults write com.apple.finder AppleShowAllFiles OFF"
|
ToggleHiddenFiles.scpt
|
global CR
|
logger.applescript
|
property filename : "applescript-core.log"
|
logger.applescript
|
property level : 1
|
logger.applescript
|
property name : missing value
|
logger.applescript
|
property logOverride : false
|
logger.applescript
|
property startSeconds : 0
|
logger.applescript
|
property logLite : missing value
|
logger.applescript
|
set sut to new("logger")
|
logger.applescript
|
info("Info Test")
|
logger.applescript
|
infof("Hello {}", "World")
|
logger.applescript
|
debugf("Hello {}", "World")
|
logger.applescript
|
debug("debug Test")
|
logger.applescript
|
set theObj to {name:"This is an object", age:1}
|
logger.applescript
|
info(theObj)
|
logger.applescript
|
logObj("Example", theObj)
|
logger.applescript
|
finish()
|
logger.applescript
|
on new(pObjectName)
|
logger.applescript
|
script LoggerInstance
|
logger.applescript
|
property objectName : pObjectName
|
logger.applescript
|
set theLabel to "Running: [" & objectName & "]"
|
logger.applescript
|
set theBar to _repeatText("=", count of theLabel)
|
logger.applescript
|
info(theBar)
|
logger.applescript
|
info(theLabel)
|
logger.applescript
|
set my startSeconds to time of (current date)
|
logger.applescript
|
set T2s to time of (current date)
|
logger.applescript
|
info("*** End: [" & my objectName & "] - " & elapsed & "s")
|
logger.applescript
|
on logOnFile(thisInfo)
|
logger.applescript
|
set my logOverride to true
|
logger.applescript
|
info(thisInfo)
|
logger.applescript
|
set my logOverride to false
|
logger.applescript
|
end logOnFile
|
logger.applescript
|
on logObj(label, obj)
|
logger.applescript
|
debug(label & ": " & _toString(obj))
|
logger.applescript
|
end logObj
|
logger.applescript
|
on infof(thisInfo as text, tokens)
|
logger.applescript
|
info(textUtil's format(thisInfo, tokens))
|
logger.applescript
|
end infof
|
logger.applescript
|
on debugf(thisInfo as text, tokens)
|
logger.applescript
|
debug(textUtil's format(thisInfo, tokens))
|
logger.applescript
|
end debugf
|
logger.applescript
|
on info(objectToLog)
|
logger.applescript
|
set thisInfo to _toString(objectToLog)
|
logger.applescript
|
set currentDate to (current date)
|
logger.applescript
|
set {year:y, month:m, day:d, time:t} to currentDate
|
logger.applescript
|
set theTime to _secsToHMS(t as integer)
|
logger.applescript
|
set theDate to short date string of currentDate
|
logger.applescript
|
set customDateTime to theDate & " " & theTime
|
logger.applescript
|
set the info_log to logFilePath
|
logger.applescript
|
set log_message to customDateTime & " " & my objectName & "> " & thisInfo
|
logger.applescript
|
log log_message
|
logger.applescript
|
write (log_message & "
|
logger.applescript
|
") to file logFilePath starting at eof
|
logger.applescript
|
log "Error encountered: " & errorMessage & ":" & logFilePath
|
logger.applescript
|
on debug(thisInfo)
|
logger.applescript
|
info("D " & _toString(thisInfo))
|
logger.applescript
|
on warn(thisMessage)
|
logger.applescript
|
info("W " & _toString(thisMessage))
|
logger.applescript
|
on warnf(thisInfo as text, tokens)
|
logger.applescript
|
warn(textUtil's format(thisInfo, tokens))
|
logger.applescript
|
end warnf
|
logger.applescript
|
on fatal(thisMessage)
|
logger.applescript
|
info("F " & _toString(thisMessage))
|
logger.applescript
|
on _secsToHMS(secs)
|
logger.applescript
|
tell (1000000 + secs div hours * 10000 + secs mod hours div minutes * 100 + secs mod minutes) as string to return text 2 thru 3 & ":" & text 4 thru 5 & ":" & text 6 thru 7
|
logger.applescript
|
end _secsToHMS
|
logger.applescript
|
on _toString(target)
|
logger.applescript
|
if class of target is string then return target
|
logger.applescript
|
if class of target is not list then set target to {target}
|
logger.applescript
|
local lst, i, txt, errMsg, orgTids, oName, oId, prefix, txtCombined
|
logger.applescript
|
repeat with anyObj in target
|
logger.applescript
|
set txt to text 2 thru -2 of txt
|
logger.applescript
|
return txtCombined
|
logger.applescript
|
end _toString
|
logger.applescript
|
to _repeatText(theText, ntimes)
|
logger.applescript
|
end _repeatText
|
logger.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.