text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set AppleScript's text item delimiters to theSearchString
|
things-load_from_template.applescript
|
set AppleScript's text item delimiters to theReplacementString
|
things-load_from_template.applescript
|
set theText to theTextItems as string
|
things-load_from_template.applescript
|
end findAndReplaceInText
|
things-load_from_template.applescript
|
on alfred_script(str)
|
script copy.applescript
|
set str to "" & str & ""
|
script copy.applescript
|
set theName to text item 1 of str
|
script copy.applescript
|
set theBody to text item 2 of str
|
script copy.applescript
|
set theNotes to (get every note whose name is theName)
|
script copy.applescript
|
set cnt to count theNotes
|
script copy.applescript
|
if cnt is greater than 0 then
|
script copy.applescript
|
set thisNote to item 1 of theNotes
|
script copy.applescript
|
set totalBody to body of thisNote
|
script copy.applescript
|
set body of thisNote to body of thisNote & "<br />" & theBody
|
script copy.applescript
|
make new note at folder "Notes" with properties {name:theName, body:"<strong>" & theName & "</strong><br /><br />" & theBody}
|
script copy.applescript
|
openURLInSTP()
|
Move URL to Safari Technology Preview.applescript
|
on openURLInSTP()
|
Move URL to Safari Technology Preview.applescript
|
if application "Safari Technology Preview" is frontmost then
|
Move URL to Safari Technology Preview.applescript
|
tell application "Safari Technology Preview"
|
Move URL to Safari Technology Preview.applescript
|
set theTab to current tab of window 1
|
Move URL to Safari Technology Preview.applescript
|
set theURL to URL of theTab
|
Move URL to Safari Technology Preview.applescript
|
close theTab
|
Move URL to Safari Technology Preview.applescript
|
make new document with properties {URL:theURL}
|
Move URL to Safari Technology Preview.applescript
|
end openURLInSTP
|
Move URL to Safari Technology Preview.applescript
|
if cornerRight is equal to 2.0 or cornerRight is equal to 1.0 or cornerRight is equal to 3.0 then return
|
CornerRightAway.applescript
|
set options to ""
|
Save%20Screenshot.scpt
|
set options to "-Wo"
|
Save%20Screenshot.scpt
|
set options to "-s"
|
Save%20Screenshot.scpt
|
set homeFolderPath to POSIX path of (path to home folder as string)
|
Save%20Screenshot.scpt
|
set screenshotStoragePath to homeFolderPath & "Pictures/Screenshots/"
|
Save%20Screenshot.scpt
|
if (not (exists folder screenshotStoragePath)) then
|
Save%20Screenshot.scpt
|
make new folder at (path to home folder as string) & "Pictures" with properties {name:"Screenshots"}
|
Save%20Screenshot.scpt
|
set timeStamp to do shell script "date '+%Y-%m-%d at %I.%M.%S %p'"
|
Save%20Screenshot.scpt
|
set screenshotFilePath to screenshotStoragePath & "Screen Shot " & timeStamp & ".png"
|
Save%20Screenshot.scpt
|
do shell script "screencapture " & options & " " & quoted form of screenshotFilePath
|
Save%20Screenshot.scpt
|
set filepath to POSIX file screenshotFilePath as alias
|
Save%20Screenshot.scpt
|
reveal filepath
|
Save%20Screenshot.scpt
|
set theWindows to documents
|
qtLoopAll.applescript
|
repeat with aWindow in theWindows
|
qtLoopAll.applescript
|
set the looping of aWindow to true
|
qtLoopAll.applescript
|
renameCues
|
Route tracks to template.applescript
|
set renameCues to false -- whether or not to append cues with the name of the chosen template
|
Route tracks to template.applescript
|
set templateGroupCueName to "Click track routing templates" -- group cue containing all template cues
|
Route tracks to template.applescript
|
if cueType is in {"Audio", "Video"} then
|
Route tracks to template.applescript
|
if eachGang is missing value then
|
Route tracks to template.applescript
|
setGang eachCue row 0 column eachChannel gang ""
|
Route tracks to template.applescript
|
setGang eachCue row 0 column eachChannel gang eachGang
|
Route tracks to template.applescript
|
if renameCues is true then
|
Route tracks to template.applescript
|
my renameCue(eachCue, whatTemplate)
|
Route tracks to template.applescript
|
on renameCue(theCue, theTemplate)
|
Route tracks to template.applescript
|
set oldName to q display name of theCue
|
Route tracks to template.applescript
|
set oldNameList to util's splitString(oldName, " | ")
|
Route tracks to template.applescript
|
set oldName to item 1 of oldNameList
|
Route tracks to template.applescript
|
set newName to oldName & " | " & theTemplate
|
Route tracks to template.applescript
|
set q name of theCue to newName
|
Route tracks to template.applescript
|
end renameCue
|
Route tracks to template.applescript
|
use framework "Contacts"
|
GetAllContactData.scpt
|
set contactStore to my CNContactStore's alloc()'s init()
|
GetAllContactData.scpt
|
set targetKeys to {my CNContactIdentifierKey, my CNContactTypeKey, my CNContactPropertyAttribute, my CNContactNamePrefixKey, my CNContactGivenNameKey, my CNContactMiddleNameKey, my CNContactFamilyNameKey, my CNContactPreviousFamilyNameKey, my CNContactNameSuffixKey, my CNContactNicknameKey, my CNContactPhoneticGivenNameKey, my CNContactPhoneticMiddleNameKey, my CNContactPhoneticFamilyNameKey, my CNContactJobTitleKey, my CNContactDepartmentNameKey, my CNContactOrganizationNameKey, my CNContactPhoneticOrganizationNameKey, my CNContactPostalAddressesKey, my CNContactEmailAddressesKey, my CNContactUrlAddressesKey, my CNContactInstantMessageAddressesKey, my CNContactPhoneNumbersKey, my CNContactSocialProfilesKey, my CNContactBirthdayKey, my CNContactNonGregorianBirthdayKey, my CNContactDatesKey, my CNContactNoteKey, my CNContactImageDataKey, my CNContactThumbnailImageDataKey, my CNContactImageDataAvailableKey, my CNContactRelationsKey, my CNGroupNameKey, my CNGroupIdentifierKey, my CNContainerNameKey, my CNContainerTypeKey, my CNInstantMessageAddressServiceKey, my CNInstantMessageAddressUsernameKey, my CNSocialProfileServiceKey, my CNSocialProfileURLStringKey, my CNSocialProfileUsernameKey, my CNSocialProfileUserIdentifierKey}
|
GetAllContactData.scpt
|
set containerID to contactStore's defaultContainerIdentifier()
|
GetAllContactData.scpt
|
set contactsPredicate to my (CNContact's predicateForContactsInContainerWithIdentifier:containerID)
|
GetAllContactData.scpt
|
set contactData to contactStore's unifiedContactsMatchingPredicate:contactsPredicate keysToFetch:targetKeys |error|:(missing value)
|
GetAllContactData.scpt
|
set contactKeyLists to {identifier, contactType, namePrefix, givenName, middleName, familyName, previousFamilyName, nameSuffix, nickname, phoneticGivenName, phoneticMiddleName, phoneticFamilyName, jobTitle, departmentName, organizationName, phoneticOrganizationName, postalAddresses, emailAddresses, urlAddresses, phoneNumbers, socialProfiles, birthday, nonGregorianBirthday, |dates|, note, imageData, thumbnailImageData, imageDataAvailable, contactRelations, instantMessageAddresses} of contactData
|
GetAllContactData.scpt
|
set contacts to {}
|
GetAllContactData.scpt
|
repeat with index from 1 to (count item 1 of contactKeyLists)
|
GetAllContactData.scpt
|
set theData to {contactIdentifier:(item index of item 1 of contactKeyLists) as text, contactType:(item index of item 2 of contactKeyLists) as text, namePrefix:(item index of item 3 of contactKeyLists) as text, givenName:(item index of item 4 of contactKeyLists) as text, middleName:(item index of item 5 of contactKeyLists) as text, familyName:(item index of item 6 of contactKeyLists) as text, previousFamilyName:(item index of item 7 of contactKeyLists) as text, nameSuffix:(item index of item 8 of contactKeyLists) as text, nickname:(item index of item 9 of contactKeyLists) as text, phoneticGivenName:(item index of item 10 of contactKeyLists) as text, phoneticMiddleName:(item index of item 11 of contactKeyLists) as text, phoneticFamilyName:(item index of item 12 of contactKeyLists) as text, jobTitle:(item index of item 13 of contactKeyLists) as text, departmentName:(item index of item 14 of contactKeyLists) as text, organizationName:(item index of item 15 of contactKeyLists) as text, phoneticOrganizationName:(item index of item 16 of contactKeyLists) as text, postalAddresses:(item index of item 17 of contactKeyLists), emailAddresses:(item index of item 18 of contactKeyLists), urlAddresses:(item index of item 19 of contactKeyLists) as list, phoneNumbers:(item index of item 20 of contactKeyLists), socialProfiles:(item index of item 21 of contactKeyLists), birthday:(item index of item 22 of contactKeyLists), nonGregorianBirthday:(item index of item 23 of contactKeyLists), |dates|:(item index of item 24 of contactKeyLists), note:(item index of item 25 of contactKeyLists) as text, imageData:(item index of item 26 of contactKeyLists), thumbnailImageData:(item index of item 27 of contactKeyLists), imageDataAvailable:(item index of item 28 of contactKeyLists) as boolean, contactRelations:(item index of item 29 of contactKeyLists), instantMessageAddresses:(item index of item 30 of contactKeyLists)}
|
GetAllContactData.scpt
|
copy theData to the end of contacts
|
GetAllContactData.scpt
|
return contacts
|
GetAllContactData.scpt
|
set username to short user name of (system info)
|
setup-applescript-apps-path.applescript
|
set PROJECT_PATH_KEY to "AppleScript Apps path"
|
setup-applescript-apps-path.applescript
|
set currentPath to missing value
|
setup-applescript-apps-path.applescript
|
set currentPath to do shell script "plutil -extract '" & PROJECT_PATH_KEY & "' raw ~/applescript-core/config-system.plist"
|
setup-applescript-apps-path.applescript
|
if currentPath is not missing value and currentPath is not "" then
|
setup-applescript-apps-path.applescript
|
set defaultPosixPath to currentPath
|
setup-applescript-apps-path.applescript
|
set defaultPosixPath to "/Applications/AppleScript/"
|
setup-applescript-apps-path.applescript
|
set chosenFolder to choose folder with prompt "Please select the AppleScript apps destination folder:" default location POSIX file defaultPosixPath
|
setup-applescript-apps-path.applescript
|
set posixPath to (POSIX path of chosenFolder)
|
setup-applescript-apps-path.applescript
|
if posixPath ends with "/" and length of posixPath is greater than 1 then set posixPath to text 1 thru -2 of posixPath
|
setup-applescript-apps-path.applescript
|
do shell script "plutil -replace '" & PROJECT_PATH_KEY & "' -string \"" & posixPath & "\" ~/applescript-core/config-system.plist"
|
setup-applescript-apps-path.applescript
|
tell application "Microsoft Remote Desktop" to activate
|
actions.applescript
|
repeat with i from 1 to 5
|
actions.applescript
|
switch_windows()
|
actions.applescript
|
on keycode_delay(thisKC, thisMOD, delayTime)
|
actions.applescript
|
key code thisKC using thisMOD
|
actions.applescript
|
delay delayTime
|
actions.applescript
|
end keycode_delay
|
actions.applescript
|
on keystroke_delay(thisKS, thisMOD, delayTime)
|
actions.applescript
|
keystroke thisKS using thisMOD
|
actions.applescript
|
end keystroke_delay
|
actions.applescript
|
on hide_MRDCWindow()
|
actions.applescript
|
keystroke_delay("w", {option down, control down}, 1)
|
actions.applescript
|
keystroke_delay("w", {command down}, 0.1)
|
actions.applescript
|
end hide_MRDCWindow
|
actions.applescript
|
on switch_windows()
|
actions.applescript
|
keystroke_delay("`", {command down}, 0.1)
|
actions.applescript
|
end switch_windows
|
actions.applescript
|
on run_string(input)
|
actions.applescript
|
keystroke_delay("r", {command down}, 0.1)
|
actions.applescript
|
keystroke_delay(input, {}, 0.1)
|
actions.applescript
|
keycode_delay(36, {}, 0.1)
|
actions.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.