text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set ipodList to {}
|
SmartIpodSync.applescript
|
tell application "iTunes"
|
SmartIpodSync.applescript
|
try -- Avoid error if there are no iPods connected
|
SmartIpodSync.applescript
|
set ipodList to (name of every source whose kind is iPod)
|
SmartIpodSync.applescript
|
if (count of ipodList) is 0 then
|
SmartIpodSync.applescript
|
return 0 -- No iPods connected
|
SmartIpodSync.applescript
|
repeat with ipodName in ipodList
|
SmartIpodSync.applescript
|
set smartPlaylists to (name of user playlists in source ipodName whose smart is true and special kind is none)
|
SmartIpodSync.applescript
|
repeat with smartName in smartPlaylists
|
SmartIpodSync.applescript
|
reveal user playlist smartName
|
SmartIpodSync.applescript
|
tell application "System Events" to tell process "iTunes"
|
SmartIpodSync.applescript
|
tell menu item "Edit Smart Playlist" of menu 1 of menu bar item 3 of menu bar 1
|
SmartIpodSync.applescript
|
if not enabled then
|
SmartIpodSync.applescript
|
set editable to false
|
SmartIpodSync.applescript
|
error 0
|
SmartIpodSync.applescript
|
tell window smartName
|
SmartIpodSync.applescript
|
if value of checkbox "Live updating" is 1 then
|
SmartIpodSync.applescript
|
click checkbox "Live updating"
|
SmartIpodSync.applescript
|
if smartName is not in livePlaylists then
|
SmartIpodSync.applescript
|
set end of livePlaylists to smartName
|
SmartIpodSync.applescript
|
click button "OK"
|
SmartIpodSync.applescript
|
update ipodName
|
SmartIpodSync.applescript
|
tell me to waitForSync()
|
SmartIpodSync.applescript
|
eject ipodName
|
SmartIpodSync.applescript
|
set livePlaylists to reverse of livePlaylists
|
SmartIpodSync.applescript
|
set counter to 0
|
SmartIpodSync.applescript
|
repeat with smartName in livePlaylists
|
SmartIpodSync.applescript
|
set counter to (counter + 1)
|
SmartIpodSync.applescript
|
if value of checkbox "Live updating" is 0 then
|
SmartIpodSync.applescript
|
set visible of process "iTunes" to false
|
SmartIpodSync.applescript
|
return counter
|
SmartIpodSync.applescript
|
on waitForSync()
|
SmartIpodSync.applescript
|
tell application "System Events" to tell application process "iTunes"
|
SmartIpodSync.applescript
|
set theStatusText to ""
|
SmartIpodSync.applescript
|
repeat until theStatusText is "iPod sync is complete."
|
SmartIpodSync.applescript
|
click ((buttons of scroll area 1 of window "iTunes") whose description is "show next view")
|
SmartIpodSync.applescript
|
set theStatusText to value of static text 1 of scroll area 1 of window "iTunes"
|
SmartIpodSync.applescript
|
end waitForSync
|
SmartIpodSync.applescript
|
tell (first menu item whose title is "WH-1000XM3") of menu of bt
|
Headphones-Connect.applescript
|
if exists menu item "Connect" then
|
Headphones-Connect.applescript
|
click menu item "Connect"
|
Headphones-Connect.applescript
|
click bt -- clean-up: click the Bluetooth icon again to close the menu
|
Headphones-Connect.applescript
|
repeat with eachCue in (selected as list)
|
Turn off infinite loop.applescript
|
set infinite loop of eachCue to false
|
Turn off infinite loop.applescript
|
set networkPatchQty to 5
|
Change Patch.applescript
|
tell application id "com.figure53.QLab.4" to tell front workspace
|
Change Patch.applescript
|
set errorOccured to false
|
Change Patch.applescript
|
set listNetwork to {}
|
Change Patch.applescript
|
repeat with i from 1 to networkPatchQty
|
Change Patch.applescript
|
set end of listNetwork to (i as string)
|
Change Patch.applescript
|
set list8 to {"1", "2", "3", "4", "5", "6", "7", "8"}
|
Change Patch.applescript
|
set theSelection to (selected as list)
|
Change Patch.applescript
|
set typeList to {}
|
Change Patch.applescript
|
repeat with eachCue in theSelection
|
Change Patch.applescript
|
set eachType to q type of eachCue
|
Change Patch.applescript
|
if eachType is not in typeList then
|
Change Patch.applescript
|
set typeList to typeList & eachType
|
Change Patch.applescript
|
if length of typeList is not 1 then
|
Change Patch.applescript
|
display alert "Select only one type of cue"
|
Change Patch.applescript
|
if typeList contains "Network" then
|
Change Patch.applescript
|
choose from list listNetwork with title "Select the patch"
|
Change Patch.applescript
|
set userPatch to (result as string)
|
Change Patch.applescript
|
choose from list list8 with title "Select the patch"
|
Change Patch.applescript
|
if userPatch is not "false" then
|
Change Patch.applescript
|
if q type of eachCue is "Network" then
|
Change Patch.applescript
|
set patch of eachCue to (userPatch as integer)
|
Change Patch.applescript
|
else if q type of eachCue is in {"Audio", "Mic", "MIDI"} and (userPatch is in list8) then
|
Change Patch.applescript
|
set errorOccured to true
|
Change Patch.applescript
|
if patch of eachCue is not (userPatch as integer) then
|
Change Patch.applescript
|
if errorOccured then
|
Change Patch.applescript
|
display alert "Something didn't work"
|
Change Patch.applescript
|
set theFilePath to (path to desktop as Unicode text) & "Things Backup.txt"
|
ExportThings.applescript
|
set theFile to (open for access file theFilePath with write permission)
|
ExportThings.applescript
|
set eof of theFile to 0
|
ExportThings.applescript
|
tell application "Things" to activate
|
ExportThings.applescript
|
tell application "Things"
|
ExportThings.applescript
|
log completed now
|
ExportThings.applescript
|
empty trash
|
ExportThings.applescript
|
set theList to {"Inbox", "Today", "Next", "Scheduled", "Someday", "Projects"}
|
ExportThings.applescript
|
write "----------" & linefeed to theFile
|
ExportThings.applescript
|
repeat with theListItem in theList
|
ExportThings.applescript
|
write "| " & theListItem & ":" & linefeed & linefeed to theFile
|
ExportThings.applescript
|
set toDos to to dos of list theListItem
|
ExportThings.applescript
|
repeat with toDo in toDos
|
ExportThings.applescript
|
set tdName to the name of toDo
|
ExportThings.applescript
|
set tdDueDate to the due date of toDo
|
ExportThings.applescript
|
set tdNotes to the notes of toDo
|
ExportThings.applescript
|
write "- " & tdName & linefeed to theFile
|
ExportThings.applescript
|
if tdDueDate is not missing value then
|
ExportThings.applescript
|
write ">> Due: " & date string of tdDueDate & linefeed to theFile
|
ExportThings.applescript
|
if tdNotes is not "" then
|
ExportThings.applescript
|
repeat with noteParagraph in paragraphs of tdNotes
|
ExportThings.applescript
|
write tab & noteParagraph & linefeed to theFile
|
ExportThings.applescript
|
if (theListItem as string = "Projects") then
|
ExportThings.applescript
|
set prToDos to to dos of project tdName
|
ExportThings.applescript
|
repeat with prToDo in prToDos
|
ExportThings.applescript
|
set prtdName to the name of prToDo
|
ExportThings.applescript
|
set prtdDueDate to the due date of prToDo
|
ExportThings.applescript
|
set prtdNotes to the notes of prToDo
|
ExportThings.applescript
|
write tab & "- " & prtdName & linefeed to theFile
|
ExportThings.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.