text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
display dialog "can't set audio device for recording, not found: " & audiodevice buttons {"OK"} | screencapture.applescript |
return device | screencapture.applescript |
end selectAudioOutput | screencapture.applescript |
on startRecording(device) | screencapture.applescript |
set doc to new screen recording | screencapture.applescript |
repeat with audiodevice in audio recording devices | screencapture.applescript |
if name of audiodevice is equal to device or device is equal to "default" then | screencapture.applescript |
set current microphone of doc to audiodevice | screencapture.applescript |
do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep 'Resolution'" | screencapture.applescript |
tell the result to set {DisplayWidth, DisplayHeight} to {word 2, word 4} | screencapture.applescript |
tell application "System Events" to tell process "QuickTime Player" | screencapture.applescript |
click at {DisplayWidth div 2, DisplayHeight div 2} | screencapture.applescript |
start doc | screencapture.applescript |
end startRecording | screencapture.applescript |
on fileExists(theFile) -- (String) as Boolean | screencapture.applescript |
on stopRecording(savepath) | screencapture.applescript |
set doc to document 1 | screencapture.applescript |
stop doc | screencapture.applescript |
keystroke savepath | screencapture.applescript |
log "export recording to " & savepath | screencapture.applescript |
repeat until my fileExists(savepath) | screencapture.applescript |
end stopRecording | screencapture.applescript |
return y & "_" & mon & "_" & d & "-" & H & "_" & M & "_" & S | screencapture.applescript |
on parseSettings(settings) | screencapture.applescript |
set savepathv to "/tmp/" & todayISOformat() & ".mov" | screencapture.applescript |
set audiodevicev to "" | screencapture.applescript |
repeat with s in settings | screencapture.applescript |
set params to stringSplit(s, "=") | screencapture.applescript |
if length of params is equal to 2 then | screencapture.applescript |
set k to item 1 of params | screencapture.applescript |
set v to item 2 of params | screencapture.applescript |
if k is equal to "savepath" then | screencapture.applescript |
set savepathv to v | screencapture.applescript |
else if k is equal to "audiodevice" then | screencapture.applescript |
set audiodevicev to v | screencapture.applescript |
return {savepath:savepathv, audiodevice:audiodevicev} | screencapture.applescript |
end parseSettings | screencapture.applescript |
set helpStr to "Usage: screencapture.applescript[(start|stop|select) params] | screencapture.applescript |
params like: | screencapture.applescript |
savepath=[path_to_save] - valid for stop, default to \"/tmp/[datetime].mov\" | screencapture.applescript |
audiodevice=[audio device name] - valid for start, select, device name like \"Soundflower (2ch)\" or \"default\" which means system default | screencapture.applescript |
set params to parseSettings(argv) | screencapture.applescript |
log params | screencapture.applescript |
set savepath to params's savepath | screencapture.applescript |
set audiodevice to params's audiodevice | screencapture.applescript |
startRecording(audiodevice) | screencapture.applescript |
stopRecording(savepath) | screencapture.applescript |
else if action is equal to "select" then | screencapture.applescript |
selectAudioOutput(audiodevice) | screencapture.applescript |
on run {note_name, notebook_name} | note_delete_with_nbname_no_confirm.applescript |
delete item 1 of note_found | note_delete_with_nbname_no_confirm.applescript |
set webSearch to text returned of (display dialog "What to search for" default answer "") | websearch.applescript |
tell application "Safari" to search the web for webSearch | websearch.applescript |
show (every record whose cell "category" is "miscellaneous") | Script 25-5.applescript |
tell layout "equipment" of window 1 | Script 25-5.applescript |
sort by field "cost" | Script 25-5.applescript |
set cost_list to field "cost" | Script 25-5.applescript |
cost_list | Script 25-5.applescript |
set target_folder to (POSIX file "/Users/IceHe/Movies") | to_folder_movies.applescript |
if myList contains "Spotify" then | NowPlaying.scpt |
if player state is stopped then | NowPlaying.scpt |
set output to "Stopped" | NowPlaying.scpt |
set trackname to name of current track | NowPlaying.scpt |
set artistname to artist of current track | NowPlaying.scpt |
set albumname to album of current track | NowPlaying.scpt |
set spotifyurl to "http://open.spotify.com/track/" & track_id | NowPlaying.scpt |
set output to "#NowPlaying=> " & trackname & " | " & artistname & " => " & spotifyurl | NowPlaying.scpt |
set output to "Spotify is not running" | NowPlaying.scpt |
set clickCounter to 0 | Web Scraping - Tealit.com.applescript |
set jobCount to 0 | Web Scraping - Tealit.com.applescript |
tell application "Safari" # open tealit website in safari | Web Scraping - Tealit.com.applescript |
set URL to "https://www.tealit.com/?view=section&sid=29" | Web Scraping - Tealit.com.applescript |
set totalPages to do JavaScript "document.getElementsByClassName('page-link')[4].parentElement.previousSibling.firstChild.textContent" | Web Scraping - Tealit.com.applescript |
tell application "Numbers" # create a new numbers spreadsheet, add columns and name the headers | Web Scraping - Tealit.com.applescript |
repeat until (count of columns) is 14 | Web Scraping - Tealit.com.applescript |
set value of cell 1 to "Listing Number" | Web Scraping - Tealit.com.applescript |
set value of cell 3 to "Email" | Web Scraping - Tealit.com.applescript |
set value of cell 4 to "Phone" | Web Scraping - Tealit.com.applescript |
set value of cell 5 to "Available When" | Web Scraping - Tealit.com.applescript |
set value of cell 6 to "Education Required" | Web Scraping - Tealit.com.applescript |
set value of cell 7 to "Student Age" | Web Scraping - Tealit.com.applescript |
set value of cell 8 to "Students Per Class" | Web Scraping - Tealit.com.applescript |
set value of cell 9 to "Contact Person" | Web Scraping - Tealit.com.applescript |
set value of cell 10 to "Location" | Web Scraping - Tealit.com.applescript |
set value of cell 11 to "District" | Web Scraping - Tealit.com.applescript |
set value of cell 12 to "Street Address" | Web Scraping - Tealit.com.applescript |
set value of cell 13 to "Company URL" | Web Scraping - Tealit.com.applescript |
set value of cell 14 to "Tealit URL" | Web Scraping - Tealit.com.applescript |
repeat with pageNumber from 1 to totalPages # Loop through all the pages | Web Scraping - Tealit.com.applescript |
tell application "Safari" # get the active page | Web Scraping - Tealit.com.applescript |
set activePage to do JavaScript "document.getElementsByClassName('page-item active')[0].firstChild.textContent" | Web Scraping - Tealit.com.applescript |
say "on Page" & activePage | Web Scraping - Tealit.com.applescript |
say "page count is " & pageNumber | Web Scraping - Tealit.com.applescript |
tell application "Safari" # get the number of jobs on this page. | Web Scraping - Tealit.com.applescript |
set pageJobCount to do JavaScript "document.getElementsByClassName('title headline-font').length" | Web Scraping - Tealit.com.applescript |
repeat with i from 0 to pageJobCount - 1 #Go through each job per page and scrape data | Web Scraping - Tealit.com.applescript |
set listingNumber to do JavaScript "document.getElementsByClassName('listing-num')[" & i & "].textContent" | Web Scraping - Tealit.com.applescript |
do JavaScript "document.getElementsByClassName('title headline-font')[" & i & "].firstChild.click()" | Web Scraping - Tealit.com.applescript |
set jobCount to jobCount + 1 | Web Scraping - Tealit.com.applescript |
say "job count" & jobCount | Web Scraping - Tealit.com.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.