text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
repeat with sourceFile in input | convertPPTtoPDF.applescript |
set filePath to (container of sourceFile) as string | convertPPTtoPDF.applescript |
set extension to (name extension of sourceFile) | convertPPTtoPDF.applescript |
set fileName to (name of sourceFile) | convertPPTtoPDF.applescript |
set extensionLength to (count extension) + 1 | convertPPTtoPDF.applescript |
set filePathWithoutExtension to filePath & (text 1 thru ((count fileName) - extensionLength)) of fileName | convertPPTtoPDF.applescript |
set destFilePath to filePathWithoutExtension & ".pdf" | convertPPTtoPDF.applescript |
launch application "Microsoft PowerPoint" | convertPPTtoPDF.applescript |
save active presentation in destFilePath as save as PDF | convertPPTtoPDF.applescript |
copy (destFilePath) to the end of output | convertPPTtoPDF.applescript |
close active presentation | convertPPTtoPDF.applescript |
on open location theURL | Ipfs.url.scheme.handler.scpt |
set theNewURL to "" | Ipfs.url.scheme.handler.scpt |
set theGateway to "https://gateway.ipfs.io/" | Ipfs.url.scheme.handler.scpt |
set isIpfsRunning to length of (do shell script "bash -lc " & quoted form of "ipfs id -f='<addrs>'") > 0 | Ipfs.url.scheme.handler.scpt |
if (isIpfsRunning) then | Ipfs.url.scheme.handler.scpt |
set theGateway to "http://127.0.0.1:8080/" | Ipfs.url.scheme.handler.scpt |
if (theURL starts with "ipfs:") then | Ipfs.url.scheme.handler.scpt |
set AppleScript's text item delimiters to "ipfs:" | Ipfs.url.scheme.handler.scpt |
set thePath to item 2 of the text items of theURL | Ipfs.url.scheme.handler.scpt |
set theNewURL to theGateway & "ipfs" & thePath | Ipfs.url.scheme.handler.scpt |
else if (theURL starts with "fs:/Qm") or (theURL starts with "fs://Qm") then | Ipfs.url.scheme.handler.scpt |
set AppleScript's text item delimiters to "fs:" | Ipfs.url.scheme.handler.scpt |
else if (theURL starts with "fs:") then | Ipfs.url.scheme.handler.scpt |
set theNewURL to theGateway & "ipns" & thePath | Ipfs.url.scheme.handler.scpt |
else if (theURL starts with "ipns:") then | Ipfs.url.scheme.handler.scpt |
set AppleScript's text item delimiters to "ipns:" | Ipfs.url.scheme.handler.scpt |
set properties of current tab to {URL:theNewURL} | Ipfs.url.scheme.handler.scpt |
return theNewURL | Ipfs.url.scheme.handler.scpt |
property waitingForContext : "wait" | Complete and Await Reply.scpt |
property waitingPrefix : "Reply on: " | Complete and Await Reply.scpt |
property notePrefix : "Reminder sent on " | Complete and Await Reply.scpt |
property daysUntilDue : -1 | Complete and Await Reply.scpt |
property multipleItemsCompleted : "Multiple Items" | Complete and Await Reply.scpt |
set itemTitle to missing value | Complete and Await Reply.scpt |
set theContextID to id of item 1 of (complete waitingForContext as context) | Complete and Await Reply.scpt |
set theWaitingForContext to first flattened context whose id is theContextID | Complete and Await Reply.scpt |
display alert "No context found whose name contains “" & waitingForContext & "”" | Complete and Await Reply.scpt |
tell content of document window 1 -- (first document window whose index is 1) | Complete and Await Reply.scpt |
set theSelectedItems to value of every selected tree | Complete and Await Reply.scpt |
display alert "You must first select an item to complete." as warning | Complete and Await Reply.scpt |
repeat with anItem in theSelectedItems | Complete and Await Reply.scpt |
set itemTitle to name of anItem | Complete and Await Reply.scpt |
set theDupe to duplicate anItem to after anItem | Complete and Await Reply.scpt |
set completed of anItem to true | Complete and Await Reply.scpt |
set oldName to name of theDupe | Complete and Await Reply.scpt |
if (oldName does not start with waitingPrefix) then | Complete and Await Reply.scpt |
set name of theDupe to waitingPrefix & oldName | Complete and Await Reply.scpt |
set oldNote to note of theDupe | Complete and Await Reply.scpt |
set note of theDupe to notePrefix & ((current date) as text) & return & oldNote | Complete and Await Reply.scpt |
set context of theDupe to theWaitingForContext | Complete and Await Reply.scpt |
set repetition of theDupe to missing value | Complete and Await Reply.scpt |
if (daysUntilDue < 0) then | Complete and Await Reply.scpt |
set due date of theDupe to missing value | Complete and Await Reply.scpt |
set due date of theDupe to (current date) + 86400 * daysUntilDue | Complete and Await Reply.scpt |
if (count of theSelectedItems) > 1 then | Complete and Await Reply.scpt |
set itemTitle to multipleItemsCompleted | Complete and Await Reply.scpt |
if itemTitle is not missing value then | Complete and Await Reply.scpt |
my notify("Completed and Awaiting Reply", itemTitle) | Complete and Await Reply.scpt |
set theFileFull to selection as text | Add Underscore To Filename.applescript |
set theFileFull to quoted form of POSIX path of theFileFull | Add Underscore To Filename.applescript |
set renameFile to do shell script "echo '" & theFileFull & "' | sed -e 's/ /_/g'" | Add Underscore To Filename.applescript |
do shell script "mv " & theFileFull & " " & renameFile | Add Underscore To Filename.applescript |
on trim_tabs_and_spaces(the_text) | Script 11-13.applescript |
considering hyphens, punctuation and white space | Script 11-13.applescript |
repeat while the_text starts with space or the_text starts with tab | Script 11-13.applescript |
set the_text to "" | Script 11-13.applescript |
repeat while the_text ends with space or the_text ends with tab | Script 11-13.applescript |
end trim_tabs_and_spaces | Script 11-13.applescript |
set theURL to "https://play.hbonow.com/series" | Show|Create-Tab.applescript |
set winList to every window | Show|Create-Tab.applescript |
set urlFound to false | Show|Create-Tab.applescript |
repeat with i from 1 to (count of winList) | Show|Create-Tab.applescript |
if item n of URLs is theURL then exit repeat | Show|Create-Tab.applescript |
set current tab to tab n | Show|Create-Tab.applescript |
set urlFound to true | Show|Create-Tab.applescript |
if urlFound is false then | Show|Create-Tab.applescript |
set current tab to make new tab at end of tabs with properties {URL:theURL} | Show|Create-Tab.applescript |
set index of window i to 1 | Show|Create-Tab.applescript |
set trashcontents to "" | Force_Empty_Trash.applescript |
tell application "Finder" to set mypath to POSIX path of (parent of (path to me) as string) | Force_Empty_Trash.applescript |
set mypath to POSIX path of mypath | Force_Empty_Trash.applescript |
set trashcontents to quoted form of (do shell script "ls /Volumes/*/.Trashes/* 2>&1 | grep -v 'No such file or directory'") | Force_Empty_Trash.applescript |
set trashcontents to trashcontents & quoted form of (do shell script "ls ~/.Trash/ | grep -v 'No such file or directory'") | Force_Empty_Trash.applescript |
set trashcontents to trashcontents as string | Force_Empty_Trash.applescript |
if length of trashcontents is not greater than 0 then -- checking for "" didn't always work | Force_Empty_Trash.applescript |
do shell script quoted form of mypath & "/terminal-notifier -title 'Force Empty Trash' -message 'Trash is already empty.' -sound 'Basso' -sender 'com.apple.finder'" | Force_Empty_Trash.applescript |
do shell script "sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; afplay '" & mypath & "/empty trash.aif'" with administrator privileges | Force_Empty_Trash.applescript |
set q name of eachCue to (newPrefix & startNum & newSuffix) | Name Cues in Sequence.applescript |
open location "https://www.google.ru/?q=" & argv | gg.applescript |
set theDays to {"t", "r"} -- Tuesday and Thursday | Generate syllabus table in Numbers.applescript |
set theHolidays to {date "Wednesday, May 27, 2015 at 12:00:00 AM"} -- include the date for any days class is cancelled here | Generate syllabus table in Numbers.applescript |
set theAssignments to {{4, "r", "essay 1"}, {8, "r", "essay 2"}} -- Week 4 Thursday essay 1, Week 8 Thursday essay 2 | Generate syllabus table in Numbers.applescript |
set headerRows to 1 -- optional header (optional but script may break at this point if it's left out...) | Generate syllabus table in Numbers.applescript |
set headerValue to "Course Schedule" | Generate syllabus table in Numbers.applescript |
set final to {date "Saturday, June 6, 2015 at 12:00:00 AM", "final exam"} -- optionally include a date and description for a single item outside of the regular schedule | Generate syllabus table in Numbers.applescript |
set totalRows to noWeeks * ((length of theDays) + 1) + headerRows | Generate syllabus table in Numbers.applescript |
set headerColumn to {} | Generate syllabus table in Numbers.applescript |
set bodyColumn to {} | Generate syllabus table in Numbers.applescript |
set theDeadlines to {} | Generate syllabus table in Numbers.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.