text
stringlengths
0
15.7k
source
stringlengths
6
112
set sortedListNames to {}
Applescript Utilities.applescript
set eachItem to item i of theList
Applescript Utilities.applescript
set end of theListNames to (name of eachItem as string)
Applescript Utilities.applescript
repeat (the number of items in theListNames) times
Applescript Utilities.applescript
repeat with i from 1 to (number of items in theListNames)
Applescript Utilities.applescript
set thisItem to item i of theListNames
Applescript Utilities.applescript
set the end of sortedListNames to the lowItem
Applescript Utilities.applescript
repeat with eachItem in indexList
Applescript Utilities.applescript
set end of sortedList to item eachItem of theList
Applescript Utilities.applescript
on listPosition(theItem, theList)
Applescript Utilities.applescript
on getFileName(theFile)
Applescript Utilities.applescript
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges({fullAccessAccountName:"admin", fullAccessPassword:""})
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
on fmGUI_ManageSecurity_ListOfAccountsAndPrivileges(prefs)
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
fmGUI_ManageSecurity_GoToTab_Accounts({prefs})
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
set accountsTable to table 1 of scroll area 1 of tab group 1 of window 1
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
set accountNamesList to value of static text 1 of every row of accountsTable
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
set privNamesList to value of static text 3 of every row of accountsTable
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
set accountsList to {}
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
repeat with i from 1 to count of accountNamesList
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
set oneAccountRow to {item i of accountNamesList, item i of privNamesList}
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
set end of accountsList to oneAccountRow
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
return accountsList
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
error "Couldn't get list of account Name Privilege Set lists - " & errMsg number errNum
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
end fmGUI_ManageSecurity_ListOfAccountsAndPrivileges
fmGUI_ManageSecurity_ListOfAccountsAndPrivileges.applescript
get class of actionList
Recursively-Get-Every-Action.applescript
class of actionList = action list) and ¬
Recursively-Get-Every-Action.applescript
(count of items of actionList) > 0 then
Recursively-Get-Every-Action.applescript
set end of allActions to a reference to contents of actionList
Recursively-Get-Every-Action.applescript
set listOfTracks to every track of playlist "Music" whose compilation is false and album artist is ""
Update Album Artist.applescript
set numberOfTracks to (length of listOfTracks)
Update Album Artist.applescript
set artistsFound to 0
Update Album Artist.applescript
repeat with i from 1 to numberOfTracks
Update Album Artist.applescript
if album artist of item i of listOfTracks is "" then
Update Album Artist.applescript
set album artist of item i of listOfTracks to get artist of item i of listOfTracks
Update Album Artist.applescript
set artistsFound to artistsFound + 1
Update Album Artist.applescript
display dialog "Number of empty Album Artists updated: " & artistsFound buttons {"OK"}
Update Album Artist.applescript
set timeZone to {"GMT -7 to -3 Americas ", "GMT 0 to + 2 Europe-Africa", "GMT +3 to + 6 Central Asia", "GMT + 7 to + 10 East Asia-Pacific"}
Web Scraping - studycelta.com.applescript
set centerData to {}
Web Scraping - studycelta.com.applescript
repeat with safariTab from 1 to count of tabs
Web Scraping - studycelta.com.applescript
tell tab safariTab
Web Scraping - studycelta.com.applescript
set numberOfCourseTypes to (do JavaScript "document.getElementsByClassName('celta_course_table').length")
Web Scraping - studycelta.com.applescript
repeat with i from 0 to (numberOfCourseTypes - 1)
Web Scraping - studycelta.com.applescript
set courseType to do JavaScript "document.getElementsByClassName('celta_course_table')[" & i & "].firstChild.firstChild.firstChild.textContent"
Web Scraping - studycelta.com.applescript
set numberOfCenters to (do JavaScript "document.getElementsByClassName('celta_course_table')[" & i & "].childNodes[1].firstChild.firstChild.childNodes.length")
Web Scraping - studycelta.com.applescript
repeat with j from 0 to (numberOfCenters - 1)
Web Scraping - studycelta.com.applescript
set numberOfRows to (do JavaScript "document.getElementsByClassName('celta_course_table')[" & i & "].childNodes[1].firstChild.firstChild.childNodes[" & j & "].firstChild.firstChild.childElementCount")
Web Scraping - studycelta.com.applescript
set centerCity to do JavaScript "document.getElementsByClassName('celta_course_table')[" & i & "].childNodes[1].firstChild.firstChild.childNodes[" & j & "].firstChild.firstChild.childNodes[0].firstChild.firstChild.textContent"
Web Scraping - studycelta.com.applescript
set centerPrice to do JavaScript "document.getElementsByClassName('celta_course_table')[" & i & "].childNodes[1].firstChild.firstChild.childNodes[" & j & "].firstChild.firstChild.childNodes[" & (numberOfRows - 1) & "].firstChild.firstChild.textContent"
Web Scraping - studycelta.com.applescript
set centerDetails to do JavaScript "document.getElementsByClassName('celta_course_table')[" & i & "].childNodes[1].firstChild.firstChild.childNodes[" & j & "].firstChild.firstChild.childNodes[" & (numberOfRows - 1) & "].firstChild.childNodes[3].textContent"
Web Scraping - studycelta.com.applescript
repeat with k from 1 to (numberOfRows - 2)
Web Scraping - studycelta.com.applescript
set centerDate to (do JavaScript "document.getElementsByClassName('celta_course_table')[" & i & "].childNodes[1].firstChild.firstChild.childNodes[" & j & "].firstChild.firstChild.childNodes[" & k & "].firstChild.firstChild.textContent")
Web Scraping - studycelta.com.applescript
set end of centerData to {item safariTab of timeZone, courseType, centerCity, centerPrice, centerDate}
Web Scraping - studycelta.com.applescript
set value of cell 1 to "Time Zone"
Web Scraping - studycelta.com.applescript
set value of cell 2 to "Course Type"
Web Scraping - studycelta.com.applescript
set value of cell 3 to "Course City"
Web Scraping - studycelta.com.applescript
set value of cell 4 to "Course Price"
Web Scraping - studycelta.com.applescript
set value of cell 5 to "Course Date Period"
Web Scraping - studycelta.com.applescript
repeat with i from 1 to count of centerData
Web Scraping - studycelta.com.applescript
if (not (exists row (i + 1))) then
Web Scraping - studycelta.com.applescript
repeat with j from 1 to count of item i of centerData
Web Scraping - studycelta.com.applescript
set value of cell j to item j of item i of centerData
Web Scraping - studycelta.com.applescript
set screenRect to get bounds of window of desktop
show_screen_resolution.applescript
display dialog "Current screen resolution is " & (item 3 of screenRect) & " by " & (item 4 of screenRect) buttons {"OK"} default button "OK" with icon note giving up after 5
show_screen_resolution.applescript
set locName to text returned of (display dialog "Search for the latitude and logitude of your location by entering the full address of the location below (include zip code and country)" default answer "" with icon note buttons {"OK"} default button {"OK"})
GetYourLatLong.applescript
set geoAddy to geocode address of locName
GetYourLatLong.applescript
set geoAddy to (geocode address of locName) as list
GetYourLatLong.applescript
set geoAddy1 to every item of geoAddy
GetYourLatLong.applescript
set geoAddy2 to item 1 of item 1 of geoAddy1
GetYourLatLong.applescript
set geoAddy3 to every item of geoAddy2
GetYourLatLong.applescript
set geoAddy4 to item 3 of geoAddy3
GetYourLatLong.applescript
set geoAddy5 to every item of geoAddy4 as list
GetYourLatLong.applescript
set LocLatLong to (get item 2 of geoAddy5) as list
GetYourLatLong.applescript
display dialog "The Lat/Long is " & LocLatLong with icon note buttons {"OK"} default button {"OK"}
GetYourLatLong.applescript
set LatLongChoice to button returned of (display dialog "Copy to Clipboard or Search with Google?" with icon note buttons {"Copy to Clipboard", "Search with Google", "Cancel"} default button {"Search with Google"})
GetYourLatLong.applescript
if LatLongChoice is "Copy to Clipboard" then
GetYourLatLong.applescript
tell application "Finder" to set the clipboard to LocLatLong as text
GetYourLatLong.applescript
if LatLongChoice is "Search with Google" then
GetYourLatLong.applescript
open location "http://www.google.com.au/search?q=" & LocLatLong
GetYourLatLong.applescript
property PDFDocument : class "PDFDocument"
test_process_pdfs.applescript
property pPdfsFolder : "/absolute/path/to/pdfs_folder/"
test_process_pdfs.applescript
property pReadyFolder : "/absolute/path/to/ready_folder/"
test_process_pdfs.applescript
property pProcessedFolder : "/absolute/Path/to/processed_folder/"
test_process_pdfs.applescript
property pPathToTextFactory : "/absolute/path/to/text_factory"
test_process_pdfs.applescript
on extractTextFromPdf(aFile)
test_process_pdfs.applescript
set vPdfString to ""
test_process_pdfs.applescript
set vPdfFilePath to POSIX path of (aFile as string)
test_process_pdfs.applescript
set vPdfURL to NSURL's fileURLWithPath:vPdfFilePath
test_process_pdfs.applescript
set vPdfDocument to PDFDocument's alloc()'s initWithURL:vPdfURL
test_process_pdfs.applescript
set vPdfString to vPdfDocument's |string|()'s stringByTrimmingCharactersInSet:(NSCharacterSet's whitespaceAndNewlineCharacterSet)
test_process_pdfs.applescript
return vPdfString as string
test_process_pdfs.applescript
end extractTextFromPdf
test_process_pdfs.applescript
on sanitizeFileName(aFilename)
test_process_pdfs.applescript
set vFileName to aFilename as string
test_process_pdfs.applescript
set vIllegalFileNameCharacters to NSCharacterSet's characterSetWithCharactersInString:"\"/\\?%*:|<>$"
test_process_pdfs.applescript
set vNSString to NSString's stringWithString:vFileName
test_process_pdfs.applescript
set vNSString to vNSString's stringByTrimmingCharactersInSet:(NSCharacterSet's whitespaceAndNewlineCharacterSet)
test_process_pdfs.applescript
set vSplitted to vNSString's componentsSeparatedByCharactersInSet:vIllegalFileNameCharacters
test_process_pdfs.applescript
set vSanitizedFileName to vSplitted's componentsJoinedByString:""
test_process_pdfs.applescript
return vSanitizedFileName as string
test_process_pdfs.applescript
end sanitizeFileName
test_process_pdfs.applescript