text
stringlengths
0
15.7k
source
stringlengths
6
112
set todos to {}
gistfile1 copy 8.applescript
set projectName to "not specified"
gistfile1 copy 8.applescript
set projectExists to false
gistfile1 copy 8.applescript
if ((count of argv) > 0) and (item 1 of argv) is not missing value then
gistfile1 copy 8.applescript
set projectName to (item 1 of argv)
gistfile1 copy 8.applescript
repeat with aProject in projects
gistfile1 copy 8.applescript
if (name of aProject is equal to projectName) then set projectExists to true
gistfile1 copy 8.applescript
if projectExists then
gistfile1 copy 8.applescript
repeat with aToDo in to dos of project projectName
gistfile1 copy 8.applescript
set theTitle to (name of aToDo as text)
gistfile1 copy 8.applescript
set theDate to "Someday"
gistfile1 copy 8.applescript
if (status of aToDo) is completed then exit repeat
gistfile1 copy 8.applescript
if (due date of aToDo) is not missing value then
gistfile1 copy 8.applescript
set theDate to my date_format(due date of aToDo as date)
gistfile1 copy 8.applescript
set todos to todos & ((theDate as text) & " - " & (theTitle as text) as text)
gistfile1 copy 8.applescript
set sorted to my simple_sort(the todos)
gistfile1 copy 8.applescript
return sorted as text
gistfile1 copy 8.applescript
return "error: project '" & projectName & "' does not exist"
gistfile1 copy 8.applescript
to date_format(old_date) -- Old_date is text, not a date.
gistfile1 copy 8.applescript
set {year:y, month:m, day:d} to old_date
gistfile1 copy 8.applescript
tell (y * 10000 + m * 100 + d) as string to text 1 thru 4 & "-" & text 5 thru 6 & "-" & text 7 thru 8
gistfile1 copy 8.applescript
end date_format
gistfile1 copy 8.applescript
set defaultPrefs to {tabName:"Tables"}
fmGUI_ManageDb_GoToTab.applescript
set tabName to tabName of prefs
fmGUI_ManageDb_GoToTab.applescript
set tabObject to a reference to (first radio button of tab group 1 of window 1 whose title contains tabName)
fmGUI_ManageDb_GoToTab.applescript
click tabObject
fmGUI_ManageDb_GoToTab.applescript
if value of tabObject is 1 then exit repeat
fmGUI_ManageDb_GoToTab.applescript
if value of tabObject is 0 then error "time out trying to change tab" number -1024
fmGUI_ManageDb_GoToTab.applescript
error "unable to fmGUI_ManageDb_GoToTab ( couldn't go to the '" & tabName of prefs & "' tab ) - " & errMsg number errNum
fmGUI_ManageDb_GoToTab.applescript
tell application "htcLib" to fmGUI_ManageDb_Open(prefs)
fmGUI_ManageDb_GoToTab.applescript
set item_name to "[ NAME OF LOGIN ITEM ]"
remove-from-login-items.applescript
tell application "System Events" to delete login item item_name
remove-from-login-items.applescript
global myBlogUsername, myBlogPass, myBlogPass, boonote, mp3uploadfolder, boojson
boos-to-blog.scpt
set myBlogUsername to "USERNAME"
boos-to-blog.scpt
set myBlogPass to "PASSWORD"
boos-to-blog.scpt
set boonote to "<em>This audio file was orginally posted to AudioBoo(m) with the mobile app. It has been downloaded and posted here since audioboom no longer supports free accounts.</em>"
boos-to-blog.scpt
set mp3uploadfolder to "http://johnjohnston.info/exboos/"
boos-to-blog.scpt
set boojson to (read POSIX file "Users/john/Desktop/audioboom/johnjohnston.json")
boos-to-blog.scpt
set boos to read JSON from boojson
boos-to-blog.scpt
set postsmade to {}
boos-to-blog.scpt
repeat with thisboo from 1 to 58
boos-to-blog.scpt
set boo to item thisboo of audio_clips of body of boos
boos-to-blog.scpt
set thesetags to {}
boos-to-blog.scpt
set c to count of tags of boo
boos-to-blog.scpt
repeat with x from 1 to c
boos-to-blog.scpt
set t to normalised_tag of item x of tags of boo
boos-to-blog.scpt
set end of thesetags to t
boos-to-blog.scpt
set tagsstring to thesetags as text
boos-to-blog.scpt
set t to title of boo
boos-to-blog.scpt
set d to description of boo
boos-to-blog.scpt
set d to ""
boos-to-blog.scpt
set u to username of user of boo
boos-to-blog.scpt
set mp3f to high_mp3 of urls of boo
boos-to-blog.scpt
set latitude to latitude of location of boo
boos-to-blog.scpt
set longitude to longitude of location of boo
boos-to-blog.scpt
set place to description of location of boo
boos-to-blog.scpt
set OpenStreetMapLink to "<a href='https://www.openstreetmap.org/#map=17/" & latitude & "/" & longitude & "'>" & place & "</a>"
boos-to-blog.scpt
set OpenStreetMapLink to " "
boos-to-blog.scpt
set dateposted to uploaded_at of boo
boos-to-blog.scpt
set d to d & return & OpenStreetMapLink & return & return & boonote
boos-to-blog.scpt
set mp3 to mp3uploadfolder & my filenamefromurl(mp3f)
boos-to-blog.scpt
set terms to {category:{"ExBoo", "wwwd"}, kind:{"audio"}, post_tag:thesetags}
boos-to-blog.scpt
set poststrut to {post_type:"post", post_date:dateposted, post_status:"publish", post_format:"audio", post_title:t, post_content:mp3 & return & d, terms_names:terms}
boos-to-blog.scpt
set end of postsmade to my postToBlog(poststrut)
boos-to-blog.scpt
return postsmade
boos-to-blog.scpt
on postToBlog(poststrut)
boos-to-blog.scpt
tell application "http://johnjohnston.info/blog/xmlrpc.php"
boos-to-blog.scpt
set myPosts to call xmlrpc {method name:"wp.newPost", parameters:{"1", myBlogUsername, myBlogPass, poststrut}}
boos-to-blog.scpt
return myPosts
boos-to-blog.scpt
end postToBlog
boos-to-blog.scpt
set currentTrack to Controller's getCurrentSong()
current-song.scpt
set output to quoted form of (item 1 of currentTrack & " - " & item 2 of currentTrack)
current-song.scpt
index_of_item_in_list("Jim", {"Mary", "Al", "Jim", "Sal"})
Script 29-8.applescript
on index_of_item_in_list(the_item, the_list)
Script 29-8.applescript
repeat with i from 1 to length of FastList's fast_list
Script 29-8.applescript
if item i of FastList's fast_list = the_item then return i
Script 29-8.applescript
end index_of_item_in_list
Script 29-8.applescript
 set today to current date
Script 9–1.applescript
if today's weekday is in {Saturday, Sunday} then
Script 9–1.applescript
display dialog "No work today!"
Script 9–1.applescript
else if today's weekday is Friday then
Script 9–1.applescript
display dialog "Thank goodness it's Friday!"
Script 9–1.applescript
set days_left to 6 - (today's weekday as integer)
Script 9–1.applescript
display dialog "Only " & days_left & " more days till the weekend!"
Script 9–1.applescript
property ScriptName : "fmGUI_ManageScripts_FmScript_Select"
fmGUI_ManageScripts_FmScript_Select.applescript
fmGUI_ManageScripts_FmScript_Select({})
fmGUI_ManageScripts_FmScript_Select.applescript
on fmGUI_ManageScripts_FmScript_Select(prefs)
fmGUI_ManageScripts_FmScript_Select.applescript
set defaultPrefs to {fmScriptName:null, altPatterns:null}
fmGUI_ManageScripts_FmScript_Select.applescript
set testCodeHeader to "tell application \"System Events\"" & return & "tell application process \"FileMaker Pro Advanced\"" & return
fmGUI_ManageScripts_FmScript_Select.applescript
set selectCode to "select ("
fmGUI_ManageScripts_FmScript_Select.applescript
set rowRefCode to "first row of (outline 1 of scroll area 1 of splitter group 1 of window 1)"
fmGUI_ManageScripts_FmScript_Select.applescript
set whoseCode to " whose "
fmGUI_ManageScripts_FmScript_Select.applescript
set scriptNameObjectCode to "name of UI Element 1"
fmGUI_ManageScripts_FmScript_Select.applescript
set betweenTestsCode to " and "
fmGUI_ManageScripts_FmScript_Select.applescript
set afterAllTestsCode to ")"
fmGUI_ManageScripts_FmScript_Select.applescript
set testCodeFooter to return & "end tell" & return & "end tell"
fmGUI_ManageScripts_FmScript_Select.applescript
if fmScriptName of prefs is equal to "-" then error "This is a SEPARATOR SCRIPT - don't try to edit it!" number -1024
fmGUI_ManageScripts_FmScript_Select.applescript
set hasExistingScripts to fmGUI_ManageScripts_ScriptListFocus({}) -- returns true is focus worked, or false if "No Scripts"
fmGUI_ManageScripts_FmScript_Select.applescript
if hasExistingScripts then
fmGUI_ManageScripts_FmScript_Select.applescript
fmGUI_ManageScripts_SearchBoxFind({searchCriteria:fmScriptName of prefs})
fmGUI_ManageScripts_FmScript_Select.applescript