text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
click menu item "Update with Things Cloud" of menu "File" of menu bar 1 | DeferredThings.scpt |
set goAgain to true | DeferredThings.scpt |
repeat while goAgain is true | DeferredThings.scpt |
set goAgain to false | DeferredThings.scpt |
repeat with thisToDo in to dos of list "Today" | DeferredThings.scpt |
set currentTagNames to tag names of thisToDo | DeferredThings.scpt |
set newTagNames to currentTagNames | DeferredThings.scpt |
if currentTagNames contains "Deferred 💤, " then | DeferredThings.scpt |
set newTagNames to my replace_chars(currentTagNames, "Deferred 💤, ", "") | DeferredThings.scpt |
else if currentTagNames contains ", Deferred 💤" then | DeferredThings.scpt |
set newTagNames to my replace_chars(currentTagNames, ", Deferred 💤", "") | DeferredThings.scpt |
else if currentTagNames contains "Deferred 💤" then | DeferredThings.scpt |
set newTagNames to my replace_chars(currentTagNames, "Deferred 💤", "") | DeferredThings.scpt |
if newTagNames ≠ currentTagNames then | DeferredThings.scpt |
set tag names of thisToDo to newTagNames | DeferredThings.scpt |
move thisToDo to list "Anytime" | DeferredThings.scpt |
"Outlook" all notifications allNotificationsList ¬ | Old Growl New Mail.applescript |
icon of application "Microsoft Outlook" | Old Growl New Mail.applescript |
set growl to true | Old Growl New Mail.applescript |
set mycontent to content of theMsg | Old Growl New Mail.applescript |
set growl to false | Old Growl New Mail.applescript |
if growl is true then | Old Growl New Mail.applescript |
notify with name "New Mail" title "Mail from " & mysender description ("\"" & mysubject & "\"") application name "Outlook" --identifier "New Mail" | Old Growl New Mail.applescript |
set songArtist to artist of theSong | getsearchquery.applescript |
return songName & " by " & songArtist | getsearchquery.applescript |
return theId | getsearchquery.applescript |
global std, LOV_PLIST, listUtil | lov.applescript |
set thisCaseId to "#extensionLessName#-spotCheck" | lov.applescript |
Manual: Basic | lov.applescript |
set sut to new("spot-lov") | lov.applescript |
set lov to sut's getLov() | lov.applescript |
repeat with nextValue in lov | lov.applescript |
logger's infof("nextValue: {}", nextValue) | lov.applescript |
logger's infof("next of XXX: {}", sut's getNextValue("xxx")) | lov.applescript |
logger's infof("next of Option 1: {}", sut's getNextValue("Option 1")) | lov.applescript |
logger's infof("next of Option 2: {}", sut's getNextValue("Option 2")) | lov.applescript |
logger's infof("Is Binary: {}", sut's isBinary()) | lov.applescript |
on new(lovName) | lov.applescript |
script LovInstance | lov.applescript |
property _lovName : lovName | lov.applescript |
property _lov : LOV_PLIST's getValue(lovName) | lov.applescript |
on getLov() | lov.applescript |
_lov | lov.applescript |
end getLov | lov.applescript |
on getNextValue(currentValue) | lov.applescript |
if _lov is missing value or (count of _lov) is 0 then return missing value | lov.applescript |
set nextIndex to 1 | lov.applescript |
set currentIndex to listUtil's indexOf(_lov, currentValue) | lov.applescript |
return item (currentIndex + 1) of _lov | lov.applescript |
item 1 of _lov | lov.applescript |
end getNextValue | lov.applescript |
on isBinary() | lov.applescript |
(count of _lov) is 2 | lov.applescript |
end isBinary | lov.applescript |
set logger to std's import("logger")'s new("lov") | lov.applescript |
set LOV_PLIST to plutil's new("lov") | lov.applescript |
set txt to "line 1 | Test.scpt |
line 2 | Test.scpt |
Xeon3D 3 | Test.scpt |
line 4" | Test.scpt |
set txtlist to paragraphs of txt | Test.scpt |
repeat with theLine in txtlist | Test.scpt |
if theLine contains "Xeon3D" then | Test.scpt |
return theLine as text | Test.scpt |
system attribute "DISPLAY" | system attribute "DISPLAY".applescript |
do action "White Text" from "Roben Kleene" | White Text.applescript |
property defaultColor : "Red" | Label files in use.applescript |
set theColors to {"No color", "Orange", "Red", "Yellow", "Blue", "Purple", "Green", "Gray"} | Label files in use.applescript |
set userColor to choose from list theColors with title "Which color?" with prompt "Label files with this color:" default items {defaultColor} | Label files in use.applescript |
repeat with n from 1 to (count theColors) | Label files in use.applescript |
if ((item n of theColors) as string) is equal to (userColor as string) then | Label files in use.applescript |
set labelColor to n - 1 | Label files in use.applescript |
set mySel to cues | Label files in use.applescript |
repeat with myCue in mySel | Label files in use.applescript |
if q type of myCue is "Audio" or q type of myCue is "Video" then | Label files in use.applescript |
set theFile to file target of myCue | Label files in use.applescript |
set the label index of item theFile to labelColor | Label files in use.applescript |
on open of finderObjects | Deskew.applescript |
set ct to the count of finderObjects | Deskew.applescript |
set amount to "40%" | Deskew.applescript |
repeat with filename in (finderObjects) | Deskew.applescript |
set ext to the name extension of filename | Deskew.applescript |
if ext is in {"tiff", "tif"} then | Deskew.applescript |
set tiff to " -define tiff:preserve-compression=true " | Deskew.applescript |
set tiff to "" | Deskew.applescript |
set fname to quoted form of POSIX path of filename | Deskew.applescript |
do shell script "/opt/homebrew/bin/magick " & fname & " +repage -deskew " & amount & tiff & " +repage $TMPDIR/tempfile.png" | Deskew.applescript |
delete file filename | Deskew.applescript |
do shell script "cp $TMPDIR/tempfile.png " & fname | Deskew.applescript |
if ct < 4 then | Deskew.applescript |
do shell script "qlmanage -p " & fname | Deskew.applescript |
select file filename | Deskew.applescript |
set value of slider 1 of tab group 1 of window 1 of process "System Preferences" to 0.9 | dis99.applescript |
use application "iTunes" | itunes_dedupe.applescript |
script util | itunes_dedupe.applescript |
on sort(aList as list, Le as integer, Ri as integer, comparator) | itunes_dedupe.applescript |
set [i, j] to [Le, Ri] | itunes_dedupe.applescript |
set v to item ((Le + Ri) div 2) in aList --> pivot in middle (as C.A.R. Hoare's algorithm) | itunes_dedupe.applescript |
repeat while j > i | itunes_dedupe.applescript |
repeat while comparator's compare(item i in aList, v) < 0 | itunes_dedupe.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.