text
stringlengths
0
15.7k
source
stringlengths
6
112
on hfs_parent_path(the_hsf_path)
FileParser.applescript
set the_parent_folder to parent_folder(the_hsf_path)
FileParser.applescript
set the_posix_path to file_URL(the_parent_folder)
FileParser.applescript
set the_hfs_file_path to hfs_file_path(the_posix_path)
FileParser.applescript
return the_hfs_file_path
FileParser.applescript
end hfs_parent_path
FileParser.applescript
on full_hsf_path(folder_posix_path, file_name)
FileParser.applescript
return alias (folder_posix_path & file_name)
FileParser.applescript
end full_hsf_path
FileParser.applescript
on full_hsf_paths(folder_posix_path, file_names)
FileParser.applescript
set file_paths to {}
FileParser.applescript
repeat with file_name in file_names
FileParser.applescript
set file_paths to file_paths & full_hsf_path(folder_posix_path, file_name)
FileParser.applescript
return file_paths
FileParser.applescript
end full_hsf_paths
FileParser.applescript
set frontProcess to first process whose frontmost is true
Hash-frontmostApp.applescript
set procName to name of frontProcess
Hash-frontmostApp.applescript
tell frontProcess
Hash-frontmostApp.applescript
tell attribute "AXDocument"
Hash-frontmostApp.applescript
set fileUrlOfFrontWindow to its value
Hash-frontmostApp.applescript
set fileUrlOfFrontWindow to missing value
Hash-frontmostApp.applescript
if fileUrlOfFrontWindow ≠ missing value and fileUrlOfFrontWindow ≠ "file:///Irrelevent" then
Hash-frontmostApp.applescript
set posixPath to (current application's class "NSURL"'s URLWithString:fileUrlOfFrontWindow)'s |path|() as text
Hash-frontmostApp.applescript
tell application id "org.sunjw.fHashMacUI"
Hash-frontmostApp.applescript
set minX to 0
safari_full_screen.applescript
set minY to 22
safari_full_screen.applescript
tell application "Finder" to set screen_resolution to items 3 thru 4 of (get bounds of desktop's window)
safari_full_screen.applescript
set maxX to item 1 of screen_resolution
safari_full_screen.applescript
set maxY to item 1 of screen_resolution
safari_full_screen.applescript
set width to maxX --1024
safari_full_screen.applescript
set myBounds to {maxX - width, minY, maxX, maxY}
safari_full_screen.applescript
set frontApp to "Safari"
safari_full_screen.applescript
set allWindows to (every document)
safari_full_screen.applescript
if (the (count of allWindows) = 0) then
safari_full_screen.applescript
set defaultPage to do shell script "defaults read com.apple.internetconfig | egrep '^ *WWWHomePage' | sed 's/^.*\" = \"\\(.*\\)\".*$/\\1/'"
safari_full_screen.applescript
make new document with properties {URL:defaultPage}
safari_full_screen.applescript
set the bounds of front window to myBounds
safari_full_screen.applescript
display dialog my getTimeStamp()
getTimeStamp.applescript
on getTimeStamp()
getTimeStamp.applescript
set localdate to (current date)
getTimeStamp.applescript
set y to year of localdate as number
getTimeStamp.applescript
set m to month of localdate as number
getTimeStamp.applescript
set d to day of localdate as number
getTimeStamp.applescript
set h to hours of localdate as number
getTimeStamp.applescript
set mi to minutes of localdate as number
getTimeStamp.applescript
set ss to seconds of localdate as number
getTimeStamp.applescript
if (count characters of (m as text)) is 1 then set m to "0" & (m as text)
getTimeStamp.applescript
if (count characters of (d as text)) is 1 then set d to "0" & (d as text)
getTimeStamp.applescript
if (count characters of (h as text)) is 1 then set h to "0" & (h as text)
getTimeStamp.applescript
if (count characters of (mi as text)) is 1 then set mi to "0" & (mi as text)
getTimeStamp.applescript
if (count characters of (ss as text)) is 1 then set ss to "0" & (ss as text)
getTimeStamp.applescript
set msg to y & m & d & h & mi & ss
getTimeStamp.applescript
return msg as text
getTimeStamp.applescript
end getTimeStamp
getTimeStamp.applescript
on adding folder items to this_folder after receiving dropped_items
Script 23-1.applescript
repeat with alias_ref in dropped_items
Script 23-1.applescript
set label_index to random number from 1 to 6
Script 23-1.applescript
set label index of alias_ref to label_index
Script 23-1.applescript
tell application "Automator"
Script 21-20.applescript
set itunes_action_names to name of Automator actions whose target application contains "iTunes"
Script 21-20.applescript
set the_selection to choose from list itunes_action_names
Script 21-20.applescript
set action_name to item 1 of the_selection
Script 21-20.applescript
set my_workflow to make workflow with properties {name:action_name & "Workflow"}
Script 21-20.applescript
add Automator action action_name to my_workflow
Script 21-20.applescript
save my_workflow in file ((path to desktop as string) & action_name)
Script 21-20.applescript
set mybibcode to do shell script "php -r 'echo trim(urldecode(" & "\"" & input & "" & "\"));'"
AddBibItem.applescript
open "~/work/Articles/articles_pdf.bib"
AddBibItem.applescript
set myfile to get first document
AddBibItem.applescript
tell myfile
AddBibItem.applescript
repeat with paper in publications
AddBibItem.applescript
set adscode to cite key of paper
AddBibItem.applescript
if mybibcode = adscode then
AddBibItem.applescript
if y = 1 then
AddBibItem.applescript
display dialog "Entry for " & (mybibcode) & " not found."
AddBibItem.applescript
set theBibTexString to do shell script "python ~/work/Articles/getadsbib.py " & mybibcode
AddBibItem.applescript
make new publication with properties {BibTeX string:theBibTexString} at end of publications
AddBibItem.applescript
tell paper
AddBibItem.applescript
if linked files is in {{}, {""}, ""} then
AddBibItem.applescript
add (POSIX file fullpath) to linked files
AddBibItem.applescript
property _Loader : AppleMods Loader
Script 19-4.applescript
property _List : missing value
Script 19-4.applescript
on __load__(moduleLoader)
Script 19-4.applescript
tell moduleLoader
Script 19-4.applescript
set _List to loadModule("List")
Script 19-4.applescript
end __load__
Script 19-4.applescript
_Loader's initScript(me)
Script 19-4.applescript
set the_list to {3, 7, 1, 9, 2, 0}
Script 19-4.applescript
set sorted_list to _List's sortList(the_list)
Script 19-4.applescript
return sorted_list
Script 19-4.applescript
say "Olá, Applescript"
exemplo1.scpt
set my_data to {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}
Script 24-18.applescript
tell (menu item "YOUR DEVICE" of menu 1) -- Type your device name here
ChangeBluetoothDevice.scpt
click btMenu
ChangeBluetoothDevice.scpt
set theURL to do shell script "pbpaste | ~/.bin/link_source_control_markdown --quote " & "--line-number " & theLineStart & " " & the quoted form of thePath
Copy Markdown Source Control Link to File.applescript
set theURL to do shell script "~/.bin/link_source_control_markdown " & the quoted form of thePath
Copy Markdown Source Control Link to File.applescript
if elIndex is equal to -1
podcasts-decrease-playback-speed.applescript
set elIndex to 5 # weird Ventura bug, 1.75x speed checkbox (5) is uncheckable
podcasts-decrease-playback-speed.applescript
if elIndex is equal to 1 then return # can't go lower
podcasts-decrease-playback-speed.applescript
click item (elIndex - 1) of els
podcasts-decrease-playback-speed.applescript
tell application "System Events" to my menu_click_recurse(r, ((process appName)'s �
menu_click.applescript