text
stringlengths
0
15.7k
source
stringlengths
6
112
on archiveMessages()
Move old email to archive.applescript
my logToConsole("Started to archive old inbox emails")
Move old email to archive.applescript
set _archiveMailbox to my findMailbox(pInboxArchiveName)
Move old email to archive.applescript
if (_archiveMailbox = null) then
Move old email to archive.applescript
my logToConsole("Can't find the archive mailbox: " & pInboxArchiveName)
Move old email to archive.applescript
my archiveMessagesFromMailbox(inbox, _archiveMailbox, pInboxArchiveDelay)
Move old email to archive.applescript
my logToConsole("Done archiving old inbox emails")
Move old email to archive.applescript
my logToConsole("Started to archive old sent mailbox emails")
Move old email to archive.applescript
set _archiveMailbox to my findMailbox(pSentArchiveName)
Move old email to archive.applescript
my logToConsole("Can't find the archive mailbox: " & pSentArchiveName)
Move old email to archive.applescript
my archiveMessagesFromMailbox(sent mailbox, _archiveMailbox, pSentArchiveDelay)
Move old email to archive.applescript
my logToConsole("Done archiving old sent mailbox email")
Move old email to archive.applescript
on error _errorMessage
Move old email to archive.applescript
my logToConsole("Error trying to archive emails: " & _errorMessage)
Move old email to archive.applescript
end archiveMessages
Move old email to archive.applescript
on archiveMessagesFromMailbox(_fromMailbox, _archiveMailbox, _days)
Move old email to archive.applescript
set secondsInInbox to 60 * 60 * 24 * _days
Move old email to archive.applescript
set dateToday to current date
Move old email to archive.applescript
set archivedCount to 0
Move old email to archive.applescript
repeat with _mailbox in mailboxes of _fromMailbox
Move old email to archive.applescript
set msgIdx to (get count of messages in _mailbox)
Move old email to archive.applescript
repeat while msgIdx ≥ 1
Move old email to archive.applescript
set msg to message msgIdx of _mailbox
Move old email to archive.applescript
set timeDifference to dateToday - (date received of msg)
Move old email to archive.applescript
if timeDifference ≥ secondsInInbox then
Move old email to archive.applescript
if (deleted status of msg is false) then
Move old email to archive.applescript
set mailbox of msg to _archiveMailbox
Move old email to archive.applescript
set archivedCount to archivedCount + 1
Move old email to archive.applescript
set msgIdx to msgIdx - 1
Move old email to archive.applescript
my logToConsole("Number of messages archived: " & archivedCount)
Move old email to archive.applescript
end archiveMessagesFromMailbox
Move old email to archive.applescript
on findMailbox(_name)
Move old email to archive.applescript
repeat with _mailbox in mailboxes
Move old email to archive.applescript
set _mailboxName to name of _mailbox
Move old email to archive.applescript
if (_mailboxName = _name) then
Move old email to archive.applescript
return _mailbox
Move old email to archive.applescript
my logToConsole("Error finding mailbox: " & _errorMessage)
Move old email to archive.applescript
end findMailbox
Move old email to archive.applescript
set thePath to theDocument's path
Reveal Document copy 5.applescript
on listPosition(thisItem, thisList)
List utilities.applescript
repeat with i from 1 to the count of thisList
List utilities.applescript
if item i of thisList is thisItem then return i
List utilities.applescript
end listPosition
List utilities.applescript
set desiredPosition to {0.666, 0.0}
8 - ⬛️⬛️🟨 … Right 1|3.scpt
set desiredSize to {0.333, 1.0}
8 - ⬛️⬛️🟨 … Right 1|3.scpt
tell application "Xcode" to activate
xcode-show-recent-projects.applescript
delay 0.333 # allow enough time to activate app
xcode-show-recent-projects.applescript
key down 63 # fn down
xcode-show-recent-projects.applescript
key code 100 using {control down} # Ctrl+F8 (reveal/navigate menu bar w/ keyboard) (or F2)
xcode-show-recent-projects.applescript
key up 63 #fn up
xcode-show-recent-projects.applescript
click menu bar item "File" of menu bar 1
xcode-show-recent-projects.applescript
click menu item "Open Recent" of menu 1 of menu bar item "File" of menu bar 1
xcode-show-recent-projects.applescript
name of every track of library playlist 1 whose album = "Kings of Swing" and rating = 100
Script 5-11.applescript
return run script (POSIX file "/Users/IceHe/Documents/AppleScript/Job_Report/send.applescript") with parameters {current date}
Send_Job_Report.applescript
do shell script "open ~/Library/iTunes/Scripts"
zOpen Folder.applescript
return ctrack
spotify.applescript
set els to UI elements of menu 1 of menu item "Playback Speed" of menu 1 of menu bar item "Controls" of menu bar 1
podcasts-increase-playback-speed.applescript
set i to 1 # item i of els
podcasts-increase-playback-speed.applescript
set elIndex to -1
podcasts-increase-playback-speed.applescript
repeat with el in els
podcasts-increase-playback-speed.applescript
set checked to (value of attribute "AXMenuItemMarkChar" of el)
podcasts-increase-playback-speed.applescript
if not (checked is equal to missing value) then set elIndex to i
podcasts-increase-playback-speed.applescript
if elIndex is equal to -1 then set elIndex to 5 # weird Ventura bug, 1.75x speed checkbox (5) is uncheckable
podcasts-increase-playback-speed.applescript
if elIndex >= (count of els) then return
podcasts-increase-playback-speed.applescript
click item (elIndex + 1) of els
podcasts-increase-playback-speed.applescript
tell application "Plex"
Plex%20Toggle.scpt
tell application "System Events" to tell process "Plex"
Plex%20Toggle.scpt
set isFullscreen to position of window 1 is {0, 0}
Plex%20Toggle.scpt
if isFullscreen then
Plex%20Toggle.scpt
tell menu "View" of menu bar 1 to click menu item "Enter Full Screen"
Plex%20Toggle.scpt
display alert "No Messages Selected" message "Select the message you want to add to Things before running this script."
Add Selected Message to Things.applescript
set taskName to subject of theMessage
Add Selected Message to Things.applescript
set taskNotes to content of theMessage
Add Selected Message to Things.applescript
tell application "Finder" to set the this_folder ¬
CreateFileInCurrentFolder.applescript
to (folder of the front window) as alias
CreateFileInCurrentFolder.applescript
on error -- no open folder windows
CreateFileInCurrentFolder.applescript
set the this_folder to path to desktop folder as alias
CreateFileInCurrentFolder.applescript
set thefilename to text returned of (display dialog ¬
CreateFileInCurrentFolder.applescript
"Create file named:" default answer "filename.txt")
CreateFileInCurrentFolder.applescript
set thefullpath to POSIX path of this_folder & thefilename
CreateFileInCurrentFolder.applescript
do shell script "touch \"" & thefullpath & "\""
CreateFileInCurrentFolder.applescript
on open photoList
Set date via exif.applescript
set ct to 0
Set date via exif.applescript
set y to "1980"
Set date via exif.applescript
set m to "January"
Set date via exif.applescript
set d to "1"
Set date via exif.applescript
set now to the year of the (current date)
Set date via exif.applescript
set dateProblem to ""
Set date via exif.applescript
repeat with photo in photoList
Set date via exif.applescript
set ct to ct + 1
Set date via exif.applescript
tell application "System Events" to set fName to (name of photo) as string
Set date via exif.applescript
set yearSet to false
Set date via exif.applescript
set mNum to 1
Set date via exif.applescript
set dNum to 1
Set date via exif.applescript
set fPath to the quoted form of (the POSIX path of photo)
Set date via exif.applescript
repeat until yearSet is true
Set date via exif.applescript
set y to text returned of (display dialog fName & return & return & dateProblem & "Enter a year after 1900:" with title "Year" default answer y)
Set date via exif.applescript
set yNum to y as integer
Set date via exif.applescript
if yNum > 1900 and yNum < (now + 1) then
Set date via exif.applescript
set yearSet to true
Set date via exif.applescript