text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set {theItems, theInput} to {{}, {}}
|
Hard-Wrap%20Selected%20Text.scpt
|
if theDefaultCount is greater than theCount then error "inputItems handler: Too many default values"
|
Hard-Wrap%20Selected%20Text.scpt
|
repeat with itemNum from 1 to theCount -- set the number of lines in the input and the defaults
|
Hard-Wrap%20Selected%20Text.scpt
|
if itemNum is greater than theDefaultCount then
|
Hard-Wrap%20Selected%20Text.scpt
|
set the end of theInput to ""
|
Hard-Wrap%20Selected%20Text.scpt
|
if theDefaultCount is greater than 0 then
|
Hard-Wrap%20Selected%20Text.scpt
|
set item itemNum of someItems to (item itemNum of someItems) & " [\"\"]"
|
Hard-Wrap%20Selected%20Text.scpt
|
set the end of theInput to item itemNum of theDefaults as string
|
Hard-Wrap%20Selected%20Text.scpt
|
set item itemNum of someItems to (item itemNum of someItems) & " [\"" & (item itemNum of theDefaults) & "\"]"
|
Hard-Wrap%20Selected%20Text.scpt
|
set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
|
Hard-Wrap%20Selected%20Text.scpt
|
set {someItems, theInput} to {someItems as text, theInput as text}
|
Hard-Wrap%20Selected%20Text.scpt
|
set theInput to paragraphs of text returned of (display dialog thePrompt & someItems with title theTitle default answer theInput)
|
Hard-Wrap%20Selected%20Text.scpt
|
repeat with anItem from 1 to theCount -- pad/truncate entered items
|
Hard-Wrap%20Selected%20Text.scpt
|
set the end of theItems to (item anItem of theInput)
|
Hard-Wrap%20Selected%20Text.scpt
|
set the end of theItems to ""
|
Hard-Wrap%20Selected%20Text.scpt
|
return theItems
|
Hard-Wrap%20Selected%20Text.scpt
|
end inputItems
|
Hard-Wrap%20Selected%20Text.scpt
|
tell application "DropSync 3"
|
BasicExample.applescript
|
set currentStore to store named "mudflats"
|
BasicExample.applescript
|
sync currentStore direction Downward
|
BasicExample.applescript
|
set timeused to 0
|
BasicExample.applescript
|
set timeoutsecs to 7200 -- 2 hours
|
BasicExample.applescript
|
repeat until syncing of currentStore is equal to false or timeused > timeoutsecs
|
BasicExample.applescript
|
timeused = timeused + 10
|
BasicExample.applescript
|
if syncing of currentStore is equal to false then quit
|
BasicExample.applescript
|
on open theFolders
|
36_03_shell_commands_example_TAR_Folder.applescript
|
repeat with theFolder in theFolders
|
36_03_shell_commands_example_TAR_Folder.applescript
|
set theName to the name of folder theFolder
|
36_03_shell_commands_example_TAR_Folder.applescript
|
set theParent to the quoted form of POSIX path of (container of theFolder as alias)
|
36_03_shell_commands_example_TAR_Folder.applescript
|
set thePath to the quoted form of POSIX path of theFolder
|
36_03_shell_commands_example_TAR_Folder.applescript
|
do shell script "tar -czf " & theParent & quoted form of theName & ".tgz " & thePath
|
36_03_shell_commands_example_TAR_Folder.applescript
|
display notification "TAR Folder" subtitle "complete"
|
36_03_shell_commands_example_TAR_Folder.applescript
|
on error errorText
|
36_03_shell_commands_example_TAR_Folder.applescript
|
display dialog errorText
|
36_03_shell_commands_example_TAR_Folder.applescript
|
reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays"
|
change%20between%202%20resolutions.scpt
|
set DisplayName to "your monitor"
|
change%20between%202%20resolutions.scpt
|
tell application "System Events" to tell process "System Preferences"
|
change%20between%202%20resolutions.scpt
|
tell window DisplayName
|
change%20between%202%20resolutions.scpt
|
click radio button "Scaled" of tab group 1
|
change%20between%202%20resolutions.scpt
|
tell table 1 of scroll area 1 of tab group 1
|
change%20between%202%20resolutions.scpt
|
if selected of row 1 then
|
change%20between%202%20resolutions.scpt
|
set selected of row 2 to true
|
change%20between%202%20resolutions.scpt
|
set selected of row 1 to true
|
change%20between%202%20resolutions.scpt
|
quit application "System Preferences"
|
change%20between%202%20resolutions.scpt
|
set appName to name of file (path to me) as text
|
Restart%20App.applescript
|
set appName to quoted form of appName
|
Restart%20App.applescript
|
set appName to do shell script "echo " & appName & " | sed 's/Restart \\(.*\\)\\.app/\\1/'"
|
Restart%20App.applescript
|
do shell script "kill $(ps -e -o pid,command | grep " & appName & " | sed -E 's/^ *([0-9]+).*$/\\1/;q'); exit 0"
|
Restart%20App.applescript
|
do shell script "open -a " & appName & ".app"
|
Restart%20App.applescript
|
tell application "RocketFuel"
|
Toggle.applescript
|
toggle
|
Toggle.applescript
|
-- lv - A Latest Version Announcer Script for Textual
|
lv4.scpt
|
property RepositoryURL : "http://xeon3d.net/textual/scripts/"
|
lv4.scpt
|
property RepositoryContentsURL : RepositoryURL & "scripts.lst"
|
lv4.scpt
|
property Echo : "/echo "
|
lv4.scpt
|
on textualcmd(cmd)
|
lv4.scpt
|
set FBold to (ASCII character 2)
|
lv4.scpt
|
set FItalic to (ASCII character 1)
|
lv4.scpt
|
set NewLine to (ASCII character 10)
|
lv4.scpt
|
set msg to "Latest Script Versions:"
|
lv4.scpt
|
set smlatest to do shell script "curl http://xeon3d.net/textual/sm/latest"
|
lv4.scpt
|
set msg to msg & " sm " & smlatest & " /"
|
lv4.scpt
|
do shell script "curl " & RepositoryContentsURL
|
lv4.scpt
|
set allScripts to result
|
lv4.scpt
|
set AvailableScripts to the paragraphs of allScripts
|
lv4.scpt
|
repeat with i from 1 to the count of AvailableScripts
|
lv4.scpt
|
set currentItem to get item i of AvailableScripts as string
|
lv4.scpt
|
set AppleScript's text item delimiters to ";"
|
lv4.scpt
|
set ItemName to first word of currentItem
|
lv4.scpt
|
set ItemVersion to second word of currentItem
|
lv4.scpt
|
set ItemDescription to text items 3 thru -2 of currentItem
|
lv4.scpt
|
set ItemChecksum to the last text item of currentItem
|
lv4.scpt
|
set msg to msg & " " & ItemName & " " & ItemVersion & " /"
|
lv4.scpt
|
set msg to characters 1 thru -3 of msg as string
|
lv4.scpt
|
return msg
|
lv4.scpt
|
end textualcmd
|
lv4.scpt
|
set content to (input as text)
|
save_to_evernote.scpt
|
set AppleScript's text item delimiters to "\n"
|
save_to_evernote.scpt
|
set textList to every text item of content
|
save_to_evernote.scpt
|
set theTitle to item 1 of textList
|
save_to_evernote.scpt
|
create note title theTitle with text content notebook "default"
|
save_to_evernote.scpt
|
display notification "Success" with title "Save to Evernote!"
|
save_to_evernote.scpt
|
set _path to (path of home folder) as string
|
Home.applescript
|
tell application "Microsoft Entourage"
|
Script 24-16.applescript
|
set selected_contacts to my get_selection_as_class(contact)
|
Script 24-16.applescript
|
if selected_contacts is missing value then
|
Script 24-16.applescript
|
repeat with this_contact in (selected_contacts)
|
Script 24-16.applescript
|
set birthday_text to birthday of this_contact
|
Script 24-16.applescript
|
set the_birthday to AppleScript's date birthday_text
|
Script 24-16.applescript
|
set month_day to day of the_birthday
|
Script 24-16.applescript
|
set month_number to month of the_birthday as integer
|
Script 24-16.applescript
|
set recurrence_string to "FREQ=YEARLY;INTERVAL=1;BYMONTHDAY=" & month_day & ";BYMONTH=" & month_number & ";WKST=SU"
|
Script 24-16.applescript
|
set the_name to first name of this_contact & " " & last name of this_contact
|
Script 24-16.applescript
|
set event_label to "Birthday - " & the_name
|
Script 24-16.applescript
|
make new event with properties {subject:event_label, start time:the_birthday, all day event:true, recurring:true, recurrence:recurrence_string}
|
Script 24-16.applescript
|
on get_selection_as_class(required_type)
|
Script 24-16.applescript
|
tell application "Microsoft Entourage"
|
Script 24-16.applescript
|
set the_selection to selection
|
Script 24-16.applescript
|
set the_class to class of the_selection
|
Script 24-16.applescript
|
if the_class is list then
|
Script 24-16.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.