text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
make new image with properties {file:logoJinhua, height:40, position:{maxPageWidth - 40 - rightMargin, topMargin - 50}} | Numbers to Pages (Spreadsheet to Document).applescript |
make table with properties {column count:2, row count:(count of items of item 1 of rowData)} | Numbers to Pages (Spreadsheet to Document).applescript |
set position to {leftMargin, topMargin + (792 * (i - 1))} | Numbers to Pages (Spreadsheet to Document).applescript |
set firstColumnWidth to 95 | Numbers to Pages (Spreadsheet to Document).applescript |
set width of first column to firstColumnWidth | Numbers to Pages (Spreadsheet to Document).applescript |
set width of second column to (maxPageWidth - leftMargin - firstColumnWidth - rightMargin) | Numbers to Pages (Spreadsheet to Document).applescript |
set tableWidth to maxPageWidth - leftMargin - rightMargin | Numbers to Pages (Spreadsheet to Document).applescript |
make text item with properties {position:{leftMargin + tableWidth * 0.11, topMargin - 40}, height:25, width:400} | Numbers to Pages (Spreadsheet to Document).applescript |
tell text item 1 | Numbers to Pages (Spreadsheet to Document).applescript |
set object text to "Jinhua English Teachers' Online Activities/Resources Form" | Numbers to Pages (Spreadsheet to Document).applescript |
set size of object text to 16 | Numbers to Pages (Spreadsheet to Document).applescript |
set fieldLabels to {"Activity Title", "Level", "Cutting Edge Unit", "Language Focus", "Activity Duration", "Overview", "Instructions", "Adaptations", "Contributor Name", "Contributor Email", "Linked File"} | Numbers to Pages (Spreadsheet to Document).applescript |
repeat with j from 1 to count of fieldLabels | Numbers to Pages (Spreadsheet to Document).applescript |
set value of cell 1 of row j to item j of fieldLabels | Numbers to Pages (Spreadsheet to Document).applescript |
repeat with j from 1 to ((count of rows)) | Numbers to Pages (Spreadsheet to Document).applescript |
tell row j | Numbers to Pages (Spreadsheet to Document).applescript |
set value of cell 2 to item j of item (i + 1) of rowData | Numbers to Pages (Spreadsheet to Document).applescript |
set alignment to left | Numbers to Pages (Spreadsheet to Document).applescript |
tell application "Home" | Play|Pause-Apple-TV.applescript |
tell process "Home" | Play|Pause-Apple-TV.applescript |
repeat until exists of (first button of scroll area 1 of group 1 of window 1 whose description is "Apple TV, Living Room") | Play|Pause-Apple-TV.applescript |
if failsafe = 100 then error "Script timeout, Apple TV button not found" | Play|Pause-Apple-TV.applescript |
set b to first button of scroll area 1 of group 1 of window 1 whose description is "Apple TV, Living Room" | Play|Pause-Apple-TV.applescript |
set v to value of b | Play|Pause-Apple-TV.applescript |
repeat until value of b ≠ v | Play|Pause-Apple-TV.applescript |
on setBounds(newBounds, appName) | CenterWindow.applescript |
tell application named appName to set bounds of first window to newBounds | CenterWindow.applescript |
tell application "System Events" to set position of first window of application process appName to newBounds | CenterWindow.applescript |
tell application "System Events" to tell application process appName to tell window 1 to set position to newBounds | CenterWindow.applescript |
"Center Window" message "App " & appName & ¬ | CenterWindow.applescript |
" is not supported." as warning | CenterWindow.applescript |
end setBounds | CenterWindow.applescript |
on getAppBounds(appName) | CenterWindow.applescript |
set appWidth to (item 3 of appBounds) - (item 1 of appBounds) | CenterWindow.applescript |
set appHeight to (item 4 of appBounds) - (item 2 of appBounds) | CenterWindow.applescript |
tell application "System Events" to tell process appName to set {appWidth, appHeight} to size of front window | CenterWindow.applescript |
tell application "System Events" to set {appWidth, appHeight} to size of first window of application process appName | CenterWindow.applescript |
return {appWidth, appHeight} | CenterWindow.applescript |
end getAppBounds | CenterWindow.applescript |
return {desktopWidth, desktopHeight} | CenterWindow.applescript |
on getNewBounds(appBounds, desktopBounds) | CenterWindow.applescript |
set aW to item 1 of appBounds | CenterWindow.applescript |
set aH to item 2 of appBounds | CenterWindow.applescript |
set dW to item 1 of desktopBounds | CenterWindow.applescript |
set dH to item 2 of desktopBounds | CenterWindow.applescript |
set newX to (dW / 2) - (aW / 2) | CenterWindow.applescript |
if aH ≥ (dH - getDockDimensions() - 22) then | CenterWindow.applescript |
set newY to 0 | CenterWindow.applescript |
set newZ to dH - getDockDimensions() | CenterWindow.applescript |
set newY to (dH - aH) / 3 | CenterWindow.applescript |
set newZ to newY + aH | CenterWindow.applescript |
set newBounds to {newX, newY, newX + aW, newZ} | CenterWindow.applescript |
return newBounds | CenterWindow.applescript |
end getNewBounds | CenterWindow.applescript |
set appBounds to getAppBounds(appName) | CenterWindow.applescript |
set desktopBounds to getDesktopBounds() | CenterWindow.applescript |
set newBounds to getNewBounds(appBounds, desktopBounds) | CenterWindow.applescript |
setBounds(newBounds, appName) | CenterWindow.applescript |
delay 0.5 -- If you get an error, it's possible this delay isn't long enough. | balance.scpt |
tell slider 1 of group 1 of tab group 1 of window 1 of process "System Preferences" | balance.scpt |
tell application "System Events" to tell UI element "HipChat" of list 1 of process "Dock" | GoingAway.scpt |
click menu item "Status" of menu 1 | GoingAway.scpt |
click menu item "Away" of menu 1 of menu item "Status" of menu 1 | GoingAway.scpt |
activate application "ScreenSaverEngine" | GoingAway.scpt |
set theRawKeywords to the clipboard as string | apply_keywords.applescript |
set dialogAnswer to display dialog ¬ | apply_keywords.applescript |
"Apply " & number of paragraphs of theRawKeywords & " keywords" buttons {"Reset Keywords", "No", "Yes"} ¬ | apply_keywords.applescript |
default button "Yes" | apply_keywords.applescript |
if button returned of dialogAnswer is "Yes" then | apply_keywords.applescript |
repeat with theLine in paragraphs of theRawKeywords | apply_keywords.applescript |
log theLine as string | apply_keywords.applescript |
setKeyword(theLine) | apply_keywords.applescript |
else if button returned of dialogAnswer is "Reset Keywords" then | apply_keywords.applescript |
resetKeywords() | apply_keywords.applescript |
on setKeyword(theKeyword) | apply_keywords.applescript |
set theCleanKeyword to my replace_chars(theKeyword, ",", " ") | apply_keywords.applescript |
set theCleanKeyword to my replace_chars(theCleanKeyword, "|", " ") | apply_keywords.applescript |
repeat with theVariant in variants of current collection | apply_keywords.applescript |
tell theVariant to make keyword with properties {name:theCleanKeyword} | apply_keywords.applescript |
end setKeyword | apply_keywords.applescript |
on resetKeywords() | apply_keywords.applescript |
delete every keyword of every variant of current collection | apply_keywords.applescript |
end resetKeywords | apply_keywords.applescript |
click button 1 of (first window whose name is "Data Viewer") | fmGUI_DataViewer_Close.applescript |
set app_name to name of the first process whose frontmost is true | edit_evernote_enml.applescript |
if (app_name is "Evernote") then | edit_evernote_enml.applescript |
if (count of noteList) = 1 then | edit_evernote_enml.applescript |
set noteGUID to my get_evernote_note_id((item 1 of noteList)'s note link) | edit_evernote_enml.applescript |
set editURL to "http://enml-editor.ping13.net/note?n=" & noteGUID | edit_evernote_enml.applescript |
open location editURL | edit_evernote_enml.applescript |
on get_evernote_note_id(this_text) | edit_evernote_enml.applescript |
return item 8 of item_list | edit_evernote_enml.applescript |
end get_evernote_note_id | edit_evernote_enml.applescript |
tell application "Finder" to open trash | auto-put-back.scpt |
property soundNameTextField : missing value | PlaySoundAppDelegate.applescript |
set soundName to soundNameTextField's stringValue() | PlaySoundAppDelegate.applescript |
set soundFilePath to "/System/Library/Sounds/" & soundName & ".aiff" | PlaySoundAppDelegate.applescript |
set chosenAccount to "Wintec" | Mail to Numbers Checkmark.applescript |
set accountMailboxes to name of mailboxes of account chosenAccount # grab list of mailboxes | Mail to Numbers Checkmark.applescript |
tell me to say "Select the mailbox" | Mail to Numbers Checkmark.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.