text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
script Controller | Controller copy 2.applescript |
property displayTime : missing value | Controller copy 2.applescript |
property startStopButton : missing value | Controller copy 2.applescript |
property timeInMinutesTextField : missing value | Controller copy 2.applescript |
property myTimer : missing value | Controller copy 2.applescript |
property totalSecondsRemaining : 0 | Controller copy 2.applescript |
on startTimer_(sender) | Controller copy 2.applescript |
set buttonTitle to sender's |title|() | Controller copy 2.applescript |
if (buttonTitle as text) is equal to "Start Timer" then | Controller copy 2.applescript |
if timeInMinutesTextField's integerValue() ≠ 0 then | Controller copy 2.applescript |
sender's setTitle_("Stop Timer") | Controller copy 2.applescript |
set numberOfMinutes to timeInMinutesTextField's integerValue() | Controller copy 2.applescript |
set totalSecondsRemaining to (numberOfMinutes * 60) | Controller copy 2.applescript |
set myTimer to NSTimer's ¬ | Controller copy 2.applescript |
scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(1, me, "updateTime:", missing value, true) | Controller copy 2.applescript |
sender's setTitle_("Start Timer") | Controller copy 2.applescript |
cancelTimer() | Controller copy 2.applescript |
displayTime's setStringValue_("Stopped!") | Controller copy 2.applescript |
playSound() | Controller copy 2.applescript |
end startTimer_ | Controller copy 2.applescript |
on cancelTimer() | Controller copy 2.applescript |
if myTimer ≠ missing value then | Controller copy 2.applescript |
myTimer's invalidate() | Controller copy 2.applescript |
set myTimer to missing value | Controller copy 2.applescript |
end cancelTimer | Controller copy 2.applescript |
on updateTime_(myTimer) | Controller copy 2.applescript |
if totalSecondsRemaining = 0 then | Controller copy 2.applescript |
displayTime's setStringValue_("Complete") | Controller copy 2.applescript |
startStopButton's setTitle_("Start Timer") | Controller copy 2.applescript |
set newTime to formatTime() | Controller copy 2.applescript |
displayTime's setStringValue_(newTime) | Controller copy 2.applescript |
set totalSecondsRemaining to totalSecondsRemaining - 1 | Controller copy 2.applescript |
end updateTime_ | Controller copy 2.applescript |
on formatTime() | Controller copy 2.applescript |
set hoursLeft to totalSecondsRemaining div 3600 | Controller copy 2.applescript |
set minutesLeft to (totalSecondsRemaining div 60) mod 60 | Controller copy 2.applescript |
set secondsLeft to totalSecondsRemaining mod 60 | Controller copy 2.applescript |
return padWithZero_(hoursLeft) & ":" & padWithZero_(minutesLeft) ¬ | Controller copy 2.applescript |
& ":" & padWithZero_(secondsLeft) | Controller copy 2.applescript |
on padWithZero_(the_number) | Controller copy 2.applescript |
if the_number < 10 then | Controller copy 2.applescript |
return "0" & the_number | Controller copy 2.applescript |
return the_number as text | Controller copy 2.applescript |
end padWithZero_ | Controller copy 2.applescript |
set delimiter to " " | ThingsExportToFile.applescript |
set wrapper to "\"" | ThingsExportToFile.applescript |
set newItem to return | ThingsExportToFile.applescript |
set plainTextFile to choose file name with prompt "Choose target text file..." | ThingsExportToFile.applescript |
if plainTextFile is "" then | ThingsExportToFile.applescript |
open for access plainTextFile with write permission | ThingsExportToFile.applescript |
display dialog "Cannot open file for writing!" | ThingsExportToFile.applescript |
set selectedToDos to selected to dos | ThingsExportToFile.applescript |
repeat with projectToDo in selectedToDos | ThingsExportToFile.applescript |
set proj to project id (id of projectToDo) | ThingsExportToFile.applescript |
display dialog "Could not get project to export" | ThingsExportToFile.applescript |
write ("Name" & delimiter & "Project" & delimiter & "Due" & delimiter & "Notes" & delimiter & "Tags" & newItem) as text to plainTextFile | ThingsExportToFile.applescript |
set projName to name of proj | ThingsExportToFile.applescript |
write projName as text to plainTextFile | ThingsExportToFile.applescript |
write (newItem & "---------------" & newItem) as text to plainTextFile | ThingsExportToFile.applescript |
repeat with toDo in to dos of proj | ThingsExportToFile.applescript |
set toDoName to name of toDo | ThingsExportToFile.applescript |
set toDoNotes to notes of toDo | ThingsExportToFile.applescript |
set toDoDue to due date of toDo | ThingsExportToFile.applescript |
set toDoTags to tag names of toDo | ThingsExportToFile.applescript |
if toDoName is not missing value then write (wrapper & toDoName & wrapper) as text to plainTextFile | ThingsExportToFile.applescript |
write (delimiter) as text to plainTextFile | ThingsExportToFile.applescript |
if projName is not missing value then write (wrapper & projName & wrapper) as text to plainTextFile | ThingsExportToFile.applescript |
if toDoDue is not missing value then write (wrapper & toDoDue & wrapper) as text to plainTextFile | ThingsExportToFile.applescript |
if toDoNotes is not missing value then write (wrapper & toDoNotes & wrapper) as text to plainTextFile | ThingsExportToFile.applescript |
if toDoTags is not missing value then write (wrapper & toDoTags & wrapper) as text to plainTextFile | ThingsExportToFile.applescript |
write (newItem) as text to plainTextFile | ThingsExportToFile.applescript |
write (newItem & newItem) as text to plainTextFile | ThingsExportToFile.applescript |
close access plainTextFile | ThingsExportToFile.applescript |
get name of application processes whose frontmost is true | Get Name Of Active Application.applescript |
set _name to getvariable "Reminder_name" | CreateReminder.applescript |
set _body to getvariable "Reminder_body" | CreateReminder.applescript |
set listNames to (get name of every list) | CreateReminder.applescript |
set myList to choose from list listNames with prompt "????" | CreateReminder.applescript |
set ListName to myList as text | CreateReminder.applescript |
make new reminder with properties {name:_name, body:_body} at list ListName | CreateReminder.applescript |
set shell to do script "# -----------ABOUT TO PYGMENTS: " & docName & " -----------" in window 1 | pygmentize.applescript |
do script "LATEX_OPTS=\"mathescape=True,encoding=utf8\"" in shell | pygmentize.applescript |
do script "VERBATIM_OPTS=\"verboptions=gobble=0,numbers=left,fontsize=\\footnotesize,tabsize=2\"" in shell | pygmentize.applescript |
do script "pygmentize -O $LATEX_OPTS -f tex -P $VERBATIM_OPTS -o " & docNmNoSlash & ".tex " & docNmNoSlash in shell | pygmentize.applescript |
do script "mv -f -v " & docNmNoSlash & ".tex fig/" in shell | pygmentize.applescript |
if currentindex is equal to totalTabs then | move_tab_right.applescript |
move tab currentindex to before tab 1 | move_tab_right.applescript |
set current tab to tab 1 | move_tab_right.applescript |
move tab currentindex to after tab (currentindex + 1) | move_tab_right.applescript |
set current tab to tab (currentindex + 1) | move_tab_right.applescript |
on addComment(theImage, theImagesFolder) | 014_02_building_functions-passing_in_variables.applescript |
addComment(anImage, theImagesFolder) | 014_02_building_functions-passing_in_variables.applescript |
the clipboard as «class utf8» | the clipboard as «class utf8».applescript |
on listFile(rootFolder) | convertSlideToPdf.v1.0.applescript |
return every file of rootFolder | convertSlideToPdf.v1.0.applescript |
end listFile | convertSlideToPdf.v1.0.applescript |
on filterFileByExtension(sourceFileList, neededExtension) | convertSlideToPdf.v1.0.applescript |
set distFileList to {} | convertSlideToPdf.v1.0.applescript |
repeat with nowFile in sourceFileList | convertSlideToPdf.v1.0.applescript |
set fileExtension to the name extension of nowFile | convertSlideToPdf.v1.0.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.