text
stringlengths
0
15.7k
source
stringlengths
6
112
set newLayerName to ""
ps_make_new_layer.scpt
set Wordlist to words of layerName
ps_make_new_layer.scpt
set numWords to length of Wordlist
ps_make_new_layer.scpt
repeat with a from numWords to numWords
ps_make_new_layer.scpt
set theCurrentListItem to item a of Wordlist
ps_make_new_layer.scpt
set item a of Wordlist to ((theCurrentListItem as number) + 1) as string
ps_make_new_layer.scpt
set Separator to ""
ps_make_new_layer.scpt
repeat with a from 1 to numWords
ps_make_new_layer.scpt
set newLayerName to newLayerName & Separator & item a of Wordlist
ps_make_new_layer.scpt
set Separator to " "
ps_make_new_layer.scpt
set newLayer to make new art layer before current layer with properties {name:newLayerName}
ps_make_new_layer.scpt
tell application "Finder" --使用系统挪威语语音"Nora"阅读txt文件
Norwegian Helper.scpt
set temp to display dialog "Please input phrases or words." default answer "" buttons {"Choose", "Read"} default button 2 with title "Norwegian Helper"
Norwegian Helper.scpt
set textanswer to the text returned of the temp --对话框返回的文本设为"textanswer"
Norwegian Helper.scpt
set buttonanswer to the button returned of the temp --对话框返回的按钮设为"buttonanswer"
Norwegian Helper.scpt
if the buttonanswer is "Choose" then
Norwegian Helper.scpt
set filechoosed to (choose file of type {"txt"} default location file "Macintosh HD:Users:xingchen:Downloads:NorwegianTextTestToRead.txt")
Norwegian Helper.scpt
set filetext to (read file filechoosed)
Norwegian Helper.scpt
say filetext using "Nora"
Norwegian Helper.scpt
say textanswer using "Nora"
Norwegian Helper.scpt
on process_file(a_file, index_page)
SaveToFile.applescript
set index_page to index_page's change_path_extension("html")
SaveToFile.applescript
if a_file's path_extension() is "applescript" then
SaveToFile.applescript
set a_text to read (a_file's posix_path())
SaveToFile.applescript
set a_text to appController's sourceOfScript_(a_file's posix_path()) as text
SaveToFile.applescript
set script_name to a_file's basename()
SaveToFile.applescript
set_template_folder("HTMLTemplate")
SaveToFile.applescript
set_assets_srcfolders({"HelpBookTemplate/assets", "HTMLTemplate/assets-non-helpbook"})
SaveToFile.applescript
HandlerElement's set_script_support(false)
SaveToFile.applescript
set dest_folder to index_page's parent_folder()
SaveToFile.applescript
set index_page to exporter's output_to_folder(¬
SaveToFile.applescript
dest_folder's as_alias(), index_page, a_text, script_name)
SaveToFile.applescript
tell application "TextEdit" --打开“文本编辑”
Read txt file.scpt
set texttest to (read file "Macintosh HD:Users:xingchen:Downloads:texttest.txt") --读取“texttest.txt”文件
Read txt file.scpt
set answer to the button returned of the result --按钮返回结果命名为"answer"
Read txt file.scpt
set theMsg to my getTheMessageToReply()
Paste first name.scpt
set the clipboard to (my getTheSenderName(theMsg) & ",\n")
Paste first name.scpt
my pasteText()
Paste first name.scpt
on getTheSenderName(theMsg)
Paste first name.scpt
return word 1 of (get sender of theMsg)
Paste first name.scpt
end getTheSenderName
Paste first name.scpt
on getTheMessageToReply()
Paste first name.scpt
set theMsgs to (selected messages of message viewer 1)
Paste first name.scpt
return first item of theMsgs
Paste first name.scpt
end getTheMessageToReply
Paste first name.scpt
on pasteText()
Paste first name.scpt
tell process "TextEdit" to keystroke "v" using {command down, option down, shift down} -- past and match style
Paste first name.scpt
end pasteText
Paste first name.scpt
tell application "AppleScript Editor" to tell front document
Comment.applescript
if ((contents of selection) as text) is not "" then
Comment.applescript
return my blockComment()
Comment.applescript
return my lineComment()
Comment.applescript
on lineComment()
Comment.applescript
set _index to item 1 of (character range of selection as list) as number
Comment.applescript
set _paragraph to a reference to paragraph (count of paragraphs in ((characters 1 through _index of contents) as text)) of contents
Comment.applescript
set _pad to ""
Comment.applescript
set _txt to contents of _paragraph as text
Comment.applescript
repeat until first character of _txt is not in {" ", tab}
Comment.applescript
set _pad to _pad & character 1 of _txt
Comment.applescript
set _txt to characters 2 through -1 of _txt as text
Comment.applescript
if _txt starts with "--" then
Comment.applescript
set contents of _paragraph to _pad & my trimLeft((characters 3 through -1 of _txt) as text, false)
Comment.applescript
set contents of _paragraph to _pad & "-- " & _txt
Comment.applescript
end lineComment
Comment.applescript
on blockComment()
Comment.applescript
set _ref to a reference to contents of selection
Comment.applescript
set _txt to my trim(contents of _ref, false)
Comment.applescript
set contents of _ref to my trimLeft((characters 3 through -3 of _txt) as text, {linefeed, return}) as text
Comment.applescript
end blockComment
Comment.applescript
on trim(_txt, _chars)
Comment.applescript
return my trimLeft(my trimRight(_txt, _chars), _chars)
Comment.applescript
on trimLeft(_txt, _chars)
Comment.applescript
if (class of _chars is not list or _chars is {}) then set _chars to {" ", tab, linefeed, return, ASCII character 0}
Comment.applescript
repeat until first character of _txt is not in _chars
Comment.applescript
set _txt to text 2 thru -1 of _txt
Comment.applescript
return _txt
Comment.applescript
end trimLeft
Comment.applescript
on trimRight(_txt, _chars)
Comment.applescript
repeat until last character of _txt is not in _chars
Comment.applescript
set _txt to text 1 thru -2 of _txt
Comment.applescript
end trimRight
Comment.applescript
set minutes to 30
auto-end-skype-call.applescript
set time to m * 60
auto-end-skype-call.applescript
delay time
auto-end-skype-call.applescript
activate application "Skype"
auto-end-skype-call.applescript
keystroke "h" using {command down, shift down}
auto-end-skype-call.applescript
set theCheckbox to checkbox 1 of tab group 1 of window "Trackpad"
EnableNaturalScrolling.scpt
set checkBoxStatus to value of theCheckbox as boolean
EnableNaturalScrolling.scpt
if checkBoxStatus is false then click theCheckbox
EnableNaturalScrolling.scpt
property _mate : "/Contents/Resources/mate"
Edit with TextMate.applescript
property _args : "-r"
Edit with TextMate.applescript
tell application "Finder" to set _files to selection as alias list
Edit with TextMate.applescript
if _app_path is missing value then set _app_path to POSIX path of (path to application id "com.macromates.textmate") as string
Edit with TextMate.applescript
if _app_path is missing value then return display alert "TextMate application not found" as warning
Edit with TextMate.applescript
do shell script (quoted form of (_app_path & _mate)) & " " & _args & " " & _pathnames
Edit with TextMate.applescript
activate application id "com.macromates.textmate"
Edit with TextMate.applescript
set theURL to URL of the active tab of front window
NASA-ADS.applescript
set input to (characters 31 thru end of theURL) as string
NASA-ADS.applescript
set adscode to do shell script "php -r 'echo trim(urldecode(" & "\"" & input & "" & "\"));'"
NASA-ADS.applescript
set fullpath to ("~/work/Articles/") & (adscode) & ".pdf"
NASA-ADS.applescript