text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
my waitUntilReady(d) | Run-Front-Script.applescript |
if not compiled then return last error message | Run-Front-Script.applescript |
return last result | Run-Front-Script.applescript |
if selection is {} then | Open in TextMate.applescript |
set finderSelection to folder of the front window as string | Open in TextMate.applescript |
set finderSelection to selection as alias list | Open in TextMate.applescript |
tm(finderSelection) | Open in TextMate.applescript |
on open (theList) | Open in TextMate.applescript |
tm(theList) | Open in TextMate.applescript |
on tm(listOfAliases) | Open in TextMate.applescript |
tell application "TextMate" | Open in TextMate.applescript |
open listOfAliases | Open in TextMate.applescript |
end tm | Open in TextMate.applescript |
tell application "Address Book" | Script 21-15.applescript |
tell every person of group "Work" | Script 21-15.applescript |
set the_names to name | Script 21-15.applescript |
set phones_by_name to value of every phone | Script 21-15.applescript |
set table_rows to {} | Script 21-15.applescript |
repeat with i from 1 to length of the_names | Script 21-15.applescript |
set end of table_rows to item i of the_names & tab & item i of phones_by_name | Script 21-15.applescript |
set AppleScript's text item delimiters to linefeed | Script 21-15.applescript |
set table_text to table_rows as text | Script 21-15.applescript |
set theList to {"Marlow", "Maddie", "Sammy", "Stuey", "Jessie", "Tolstoy"} | progress-bar-example.applescript |
set the itemCount to the count of theList | progress-bar-example.applescript |
set progress total steps to the itemCount | progress-bar-example.applescript |
repeat with i from 1 to itemCount | progress-bar-example.applescript |
set thisItem to item i of theList | progress-bar-example.applescript |
set progress description to "Item " & i & " of " & itemCount | progress-bar-example.applescript |
set progress additional description to thisItem | progress-bar-example.applescript |
set progress completed steps to i | progress-bar-example.applescript |
on progress_start(steps, descript, descript_add) | progress-bar-example.applescript |
set progress total steps to steps | progress-bar-example.applescript |
set progress completed steps to 0 | progress-bar-example.applescript |
set progress description to descript | progress-bar-example.applescript |
set progress additional description to descript_add | progress-bar-example.applescript |
end progress_start | progress-bar-example.applescript |
on progress_update(n, steps, message) | progress-bar-example.applescript |
set progress additional description to message & n & " of " & steps | progress-bar-example.applescript |
end progress_update | progress-bar-example.applescript |
on progress_step(n) | progress-bar-example.applescript |
set progress completed steps to n | progress-bar-example.applescript |
end progress_step | progress-bar-example.applescript |
on progress_end() | progress-bar-example.applescript |
set progress total steps to 0 | progress-bar-example.applescript |
set progress description to "" | progress-bar-example.applescript |
set progress additional description to "" | progress-bar-example.applescript |
end progress_end | progress-bar-example.applescript |
set monthList to {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} | Checkpoint Navigator.applescript |
set dayList to {"31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31"} | Checkpoint Navigator.applescript |
set dayNameList to {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"} | Checkpoint Navigator.applescript |
set myModCheckPointList to {} | Checkpoint Navigator.applescript |
set myCheckPointPath to "/Volumes/home/.ckpt" | Checkpoint Navigator.applescript |
set myDateTodayDay to (do shell script "date \"+%e\"") as integer | Checkpoint Navigator.applescript |
set myDateTodayMonth to do shell script "date \"+%B\"" | Checkpoint Navigator.applescript |
set myDateTodayYear to (do shell script "date \"+%Y\"") as integer | Checkpoint Navigator.applescript |
set myYesterdayMonth to "" | Checkpoint Navigator.applescript |
if (myDateTodayYear mod 4) = 0 then | Checkpoint Navigator.applescript |
if (myDateTodayYear mod 100) = 0 then | Checkpoint Navigator.applescript |
if (myDateTodayYear mod 400) = 0 then | Checkpoint Navigator.applescript |
set myLeapYear to true | Checkpoint Navigator.applescript |
set myLeapYear to false | Checkpoint Navigator.applescript |
if myDateTodayDay = 1 then -- beginning of month | Checkpoint Navigator.applescript |
if myDateTodayMonth = 1 then --beginning of year | Checkpoint Navigator.applescript |
set myYesterdayDay to 31 | Checkpoint Navigator.applescript |
set myYesterdayMonth to 12 | Checkpoint Navigator.applescript |
else -- beginning of month, not beginning of year | Checkpoint Navigator.applescript |
set myYesterdayMonth to myDateTodayMonth - 1 | Checkpoint Navigator.applescript |
set myYesterdayDay to (item myYesterdayMonth of dayList) | Checkpoint Navigator.applescript |
if (myLeapYear = true) and (myDateTodayMonth = 3) then set myYesterdayDay to 29 | Checkpoint Navigator.applescript |
else -- not beginning of month | Checkpoint Navigator.applescript |
set myYesterdayDay to myDateTodayDay - 1 | Checkpoint Navigator.applescript |
set text item delimiters to return | Checkpoint Navigator.applescript |
do shell script "test -d " & myCheckPointPath | Checkpoint Navigator.applescript |
display dialog "No checkpoints found." & return & "Is the NAS mounted?" buttons {"Exit"} default button 1 with icon stop | Checkpoint Navigator.applescript |
return --Exit script now | Checkpoint Navigator.applescript |
set myCheckPoints to do shell script "ls " & myCheckPointPath | Checkpoint Navigator.applescript |
set myCheckPointList to text items of myCheckPoints | Checkpoint Navigator.applescript |
repeat with i from 1 to the count of myCheckPointList | Checkpoint Navigator.applescript |
set thisItem to (item i of myCheckPointList) | Checkpoint Navigator.applescript |
set the text item delimiters to "_" | Checkpoint Navigator.applescript |
set myItem to text items of thisItem | Checkpoint Navigator.applescript |
set myYear to item 1 of myItem | Checkpoint Navigator.applescript |
set myMonth to item 2 of myItem as integer | Checkpoint Navigator.applescript |
set myMonthName to item myMonth of monthList | Checkpoint Navigator.applescript |
set myDay to item 3 of myItem as integer | Checkpoint Navigator.applescript |
set myTime to item 4 of myItem | Checkpoint Navigator.applescript |
set myZone to item 5 of myItem | Checkpoint Navigator.applescript |
set the text item delimiters to "." | Checkpoint Navigator.applescript |
set myTimeElements to text items of myTime | Checkpoint Navigator.applescript |
set myTimeHour to text item 1 of myTimeElements as integer | Checkpoint Navigator.applescript |
set myTimeMinute to text item 2 of myTimeElements | Checkpoint Navigator.applescript |
if myTimeHour > 12 then | Checkpoint Navigator.applescript |
set myModHour to myTimeHour - 12 | Checkpoint Navigator.applescript |
set myModZone to "pm" | Checkpoint Navigator.applescript |
set myModHour to myTimeHour as string | Checkpoint Navigator.applescript |
set myModZone to "am" | Checkpoint Navigator.applescript |
if myDay = myDateTodayDay then | Checkpoint Navigator.applescript |
set MyModDay to "Today" | Checkpoint Navigator.applescript |
else if myDay = myYesterdayDay then | Checkpoint Navigator.applescript |
set MyModDay to "Yesterday" | Checkpoint Navigator.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.