text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set theString to newList as string | convertToLowerCase.applescript |
end convertToLowerCase | convertToLowerCase.applescript |
set interval to item 1 of argv as number | iTunesToTrakt.applescript |
set apiKey to item 2 of argv as string | iTunesToTrakt.applescript |
set username to item 3 of argv as string | iTunesToTrakt.applescript |
set pass to item 4 of argv as string | iTunesToTrakt.applescript |
set baseUrl to "http://api.trakt.tv/" | iTunesToTrakt.applescript |
set episodeUrl to baseUrl & "show/episode/seen/" & apiKey | iTunesToTrakt.applescript |
set movieUrl to baseUrl & "movie/seen/" & apiKey | iTunesToTrakt.applescript |
set currDate to current date | iTunesToTrakt.applescript |
set currDate to currDate - (interval * hours) | iTunesToTrakt.applescript |
set userPass to "{\"username\" : \"" & username & "\", \"password\" : \"" & pass & "\","
set sendUrl to ""
tell application "iTunes"
set theLists to every playlist whose special kind is TV Shows or special kind is Movies
repeat with theList in theLists
set allTracks to (every track of theList whose played date > currDa... | iTunesToTrakt.applescript |
else if typeOfTrack is TV show then | iTunesToTrakt.applescript |
set sendUrl to episodeUrl | iTunesToTrakt.applescript |
set theShow to show of aTrack | iTunesToTrakt.applescript |
set theSeason to season number of aTrack | iTunesToTrakt.applescript |
set theEpisode to episode number of aTrack | iTunesToTrakt.applescript |
set sendData to userPass & "\"title\" : \"" & theShow & "\", \"year\" : " & theYear & ", \"episodes\" : [{ \"season\" : " & theSeason & ", \"episode\": " & theEpisode & "}]" | iTunesToTrakt.applescript |
set sendData to sendData & "}" | iTunesToTrakt.applescript |
set cmd to "curl " & sendUrl & " -X POST --data '" & sendData & "' -H 'Content-type: application/json'" | iTunesToTrakt.applescript |
tell me to do shell script cmd | iTunesToTrakt.applescript |
return "No new movies or TV show episodes watched." as string | iTunesToTrakt.applescript |
set the1 to text returned of (display dialog "1st" default answer "Number here" buttons {"Continue"} default button 1) | TellApplicationFinderCalculator_V1.applescript |
set the2 to text returned of (display dialog "2nd" default answer "Number here" buttons {"Continue"} default button 1) | TellApplicationFinderCalculator_V1.applescript |
set the1 to the1 as integer | TellApplicationFinderCalculator_V1.applescript |
set the2 to the2 as integer | TellApplicationFinderCalculator_V1.applescript |
display dialog "You may only input numbers into a calculator." with title "ERROR" buttons {"OK"} default button 1 | TellApplicationFinderCalculator_V1.applescript |
if the button returned of (display dialog "Add?" buttons {"No", "Yes"} default button 2) is "Yes" then | TellApplicationFinderCalculator_V1.applescript |
set ans to (the1 + the2) | TellApplicationFinderCalculator_V1.applescript |
display dialog ans with title "Answer" buttons {"OK"} default button 1 | TellApplicationFinderCalculator_V1.applescript |
say ans | TellApplicationFinderCalculator_V1.applescript |
else if the button returned of (display dialog "Subtract?" buttons {"No", "Yes"} default button 2) is "Yes" then | TellApplicationFinderCalculator_V1.applescript |
set ans to (the1 - the2) | TellApplicationFinderCalculator_V1.applescript |
else if the button returned of (display dialog "Multiply?" buttons {"No", "Yes"} default button 2) is "Yes" then | TellApplicationFinderCalculator_V1.applescript |
set ans to (the1 * the2) | TellApplicationFinderCalculator_V1.applescript |
else if the button returned of (display dialog "Divide?" buttons {"No", "Yes"} default button 2) is "Yes" then | TellApplicationFinderCalculator_V1.applescript |
set ans to (the1 / the2) | TellApplicationFinderCalculator_V1.applescript |
say "You haven't selected a function. The operation has cancelled." | TellApplicationFinderCalculator_V1.applescript |
set _date to current date | start-today.applescript |
set time of _date to 8 * hours | start-today.applescript |
set _action's defer date to _date | start-today.applescript |
on make_case_insensitive_associative_list() | Script 19-11.applescript |
script CaseInsensitiveAssociativeList | Script 19-11.applescript |
property parent : _make_associative_list() | Script 19-11.applescript |
on find_record_for_key(the_key) | Script 19-11.applescript |
return continue find_record_for_key(the_key) | Script 19-11.applescript |
end find_record_for_key | Script 19-11.applescript |
end make_case_insensitive_associative_list | Script 19-11.applescript |
on make_case_sensitive_associative_list() | Script 19-11.applescript |
script CaseSensitiveAssociativeList | Script 19-11.applescript |
end make_case_sensitive_associative_list | Script 19-11.applescript |
fmGUI_2empowerFM_Toolbox_Close() | fmGUI_ALL_Utilities_Close.applescript |
fmGUI_DataViewer_Close() | fmGUI_ALL_Utilities_Close.applescript |
fmGUI_Inspector_Close() | fmGUI_ALL_Utilities_Close.applescript |
on fmGUI_2empowerFM_Toolbox_Close() | fmGUI_ALL_Utilities_Close.applescript |
tell application "htcLib" to fmGUI_2empowerFM_Toolbox_Close() | fmGUI_ALL_Utilities_Close.applescript |
end fmGUI_2empowerFM_Toolbox_Close | fmGUI_ALL_Utilities_Close.applescript |
on fmGUI_DataViewer_Close() | fmGUI_ALL_Utilities_Close.applescript |
tell application "htcLib" to fmGUI_DataViewer_Close() | fmGUI_ALL_Utilities_Close.applescript |
end fmGUI_DataViewer_Close | fmGUI_ALL_Utilities_Close.applescript |
on fmGUI_Inspector_Close() | fmGUI_ALL_Utilities_Close.applescript |
tell application "htcLib" to fmGUI_Inspector_Close() | fmGUI_ALL_Utilities_Close.applescript |
end fmGUI_Inspector_Close | fmGUI_ALL_Utilities_Close.applescript |
set AirplayDeviceName to "Apple TV" | wake-up-tv-with-music.applescript |
set iTunesPlaylistName to "Loved" | wake-up-tv-with-music.applescript |
set iTunesVolume to 100 | wake-up-tv-with-music.applescript |
set AirplayVolume to 20 | wake-up-tv-with-music.applescript |
activate application "iTunes" | wake-up-tv-with-music.applescript |
set AirplayNames to (get name of AirPlay devices) | wake-up-tv-with-music.applescript |
set AirplayDevices to (get AirPlay devices) | wake-up-tv-with-music.applescript |
set AirplayToPlay to {} | wake-up-tv-with-music.applescript |
repeat with i from 1 to length of AirplayNames | wake-up-tv-with-music.applescript |
if item i of AirplayNames as string = AirplayDeviceName then set end of AirplayToPlay to item i of AirplayDevices | wake-up-tv-with-music.applescript |
set current AirPlay devices to AirplayToPlay | wake-up-tv-with-music.applescript |
play playlist iTunesPlaylistName | wake-up-tv-with-music.applescript |
set the sound volume to iTunesVolume | wake-up-tv-with-music.applescript |
set textTemplateFolder to ((path to documents folder)) as text | things-load_from_template.applescript |
set aliasTemplateChoosen to ¬ | things-load_from_template.applescript |
(choose file with prompt ¬ | things-load_from_template.applescript |
"Choose the template you want to use:" of type {"public.text"} ¬ | things-load_from_template.applescript |
default location (alias textTemplateFolder) ¬ | things-load_from_template.applescript |
invisibles false ¬ | things-load_from_template.applescript |
open for access aliasTemplateChoosen | things-load_from_template.applescript |
set dataTemplateChoosen to ¬ | things-load_from_template.applescript |
read aliasTemplateChoosen ¬ | things-load_from_template.applescript |
using delimiter {linefeed} ¬ | things-load_from_template.applescript |
as «class utf8» | things-load_from_template.applescript |
close access aliasTemplateChoosen | things-load_from_template.applescript |
set {textFileName, textFileExtension} to the {displayed name, name extension} ¬ | things-load_from_template.applescript |
of aliasTemplateChoosen | things-load_from_template.applescript |
set textFileName to my findAndReplaceInText(textFileName, "." & textFileExtension, "") | things-load_from_template.applescript |
set projectFromTemplate to ¬ | things-load_from_template.applescript |
make new project ¬ | things-load_from_template.applescript |
with properties {name:textFileName} | things-load_from_template.applescript |
repeat with textItem in dataTemplateChoosen | things-load_from_template.applescript |
tell projectFromTemplate to ¬ | things-load_from_template.applescript |
make new to do ¬ | things-load_from_template.applescript |
with properties {name:textItem} | things-load_from_template.applescript |
edit projectFromTemplate | things-load_from_template.applescript |
on findAndReplaceInText(theText, theSearchString, theReplacementString) | things-load_from_template.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.