text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell tab group 1 of group 1 of window "ASUS PB278 (1)"
|
display.applescript
|
click radio button "Default for display"
|
display.applescript
|
tell window "ASUS PB278 (1)"
|
display.applescript
|
repeat until exists group 1 of group 1 of toolbar 1
|
display.applescript
|
tell group 1 of group 1 of toolbar 1
|
display.applescript
|
click button 1 -- click the back button
|
display.applescript
|
set the clipboard to resub(URL_list, "chrome-extension://[a-z]+/suspended.html#uri=", "")
|
Safari tab URLs to clipboard.scpt
|
set this_selection to the selection
|
Flip Vertical.applescript
|
if this_selection is {} then error "Please select some images."
|
Flip Vertical.applescript
|
repeat with this_item in this_selection
|
Flip Vertical.applescript
|
if the type of this_item is equal to picture then
|
Flip Vertical.applescript
|
set this_image to the image of this_item
|
Flip Vertical.applescript
|
with timeout of 30 seconds
|
Flip Vertical.applescript
|
set this_file to open file this_image
|
Flip Vertical.applescript
|
flip this_file with vertical
|
Flip Vertical.applescript
|
save this_file without icon
|
Flip Vertical.applescript
|
close this_file
|
Flip Vertical.applescript
|
tell application "Spotify" to playpause
|
spotify-playpause.applescript
|
property add_to_top : "<br /><br /><br /><br /><br /><hr />"
|
Add Text To Beginning of Notes.applescript
|
property noteHTML : ""
|
Add Text To Beginning of Notes.applescript
|
set theNotes to selection
|
Add Text To Beginning of Notes.applescript
|
set noteHTML to (HTML content of item 1 of theNote)
|
Add Text To Beginning of Notes.applescript
|
set addString to "<body>" & add_to_top
|
Add Text To Beginning of Notes.applescript
|
set editHTML to my replaceString(noteHTML, "<body>", addString)
|
Add Text To Beginning of Notes.applescript
|
set (HTML content of item 1 of theNote) to editHTML
|
Add Text To Beginning of Notes.applescript
|
on replaceString(theString, theOriginalString, theNewString)
|
Add Text To Beginning of Notes.applescript
|
set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, theOriginalString}
|
Add Text To Beginning of Notes.applescript
|
set theStringParts to text items of theString
|
Add Text To Beginning of Notes.applescript
|
if (count of theStringParts) is greater than 1 then
|
Add Text To Beginning of Notes.applescript
|
set theString to text item 1 of theStringParts as string
|
Add Text To Beginning of Notes.applescript
|
repeat with eachPart in items 2 thru -1 of theStringParts
|
Add Text To Beginning of Notes.applescript
|
set theString to theString & theNewString & eachPart as string
|
Add Text To Beginning of Notes.applescript
|
tell application "System Events" to do shell script "defaults write com.apple.finder AppleShowAllFiles -bool true"
|
simple-applescript.applescript
|
tell app "Finder" to set the clipboard to (POSIX file "/Users/zhangyongkang/Desktop/Markdown.md")
|
simple-applescript.applescript
|
set visibleApps to every process whose visible is true
|
simple-applescript.applescript
|
repeat with theApp in visibleApps
|
simple-applescript.applescript
|
set visible of theApp to false
|
simple-applescript.applescript
|
set folderPath to insertion location as alias
|
simple-applescript.applescript
|
set fileName to ("filename with extension")
|
simple-applescript.applescript
|
if exists file (folderPath & fileName as text) then
|
simple-applescript.applescript
|
set activeApp to name of current application
|
simple-applescript.applescript
|
tell process "Finder"
|
simple-applescript.applescript
|
set _location to position of back window
|
simple-applescript.applescript
|
set _size to size of front window
|
simple-applescript.applescript
|
set windowList to windows
|
simple-applescript.applescript
|
set finderWindowPath to {}
|
simple-applescript.applescript
|
repeat with _window in windowList
|
simple-applescript.applescript
|
set the end of finderWindowPath to POSIX path of (folder of _window as alias)
|
simple-applescript.applescript
|
return finderWindowPath
|
simple-applescript.applescript
|
if application "Finder" is not running then
|
simple-applescript.applescript
|
return "Not running"
|
simple-applescript.applescript
|
set allCollapse to true
|
simple-applescript.applescript
|
set allCollapse to (collapsed of (_window)) and allCollapse
|
simple-applescript.applescript
|
return allCollapse
|
simple-applescript.applescript
|
if windows of application "Finder" is {} then
|
simple-applescript.applescript
|
set filePath to ("${folderPath}")
|
simple-applescript.applescript
|
POSIX file filePath as alias
|
simple-applescript.applescript
|
activate application "Opera"
|
simple-applescript.applescript
|
tell application "Opera"
|
simple-applescript.applescript
|
if windows of application "Opera" is {} then
|
simple-applescript.applescript
|
tell application "Opera" to key code 45 using {command down}
|
simple-applescript.applescript
|
make new tab with properties {URL:"https://www.zhihu.com"}
|
simple-applescript.applescript
|
key code 40 using {command down}
|
simple-applescript.applescript
|
tell application "System Events" to set quitapps to name of every application process whose visible is true and name is not "Finder"
|
simple-applescript.applescript
|
repeat with closeall in quitapps
|
simple-applescript.applescript
|
quit application closeall
|
simple-applescript.applescript
|
set pathFile to POSIX file "/Users/zhangyongkang/Desktop/Code"
|
simple-applescript.applescript
|
do shell script "qlmanage -p \"" & pathFile & "\""
|
simple-applescript.applescript
|
set link to the clipboard
|
simple-applescript.applescript
|
open location link
|
simple-applescript.applescript
|
return POSIX path of (choose folder)
|
simple-applescript.applescript
|
return POSIX path of (choose file)
|
simple-applescript.applescript
|
runIt()
|
Date Filenames.applescript
|
on runIt()
|
Date Filenames.applescript
|
set theDate to do shell script "date +%F"
|
Date Filenames.applescript
|
set theSelection to get selection
|
Date Filenames.applescript
|
set the name of theFile to theDate & " " & the name of theFile as text
|
Date Filenames.applescript
|
end runIt
|
Date Filenames.applescript
|
tell application "Finder" to get the name of the second Finder window
|
Untitled 2.applescript
|
set scptpath to POSIX path of (path to me) as Unicode text
|
runemacs.applescript
|
set emacs_d to do shell script "echo $(dirname " & scptpath & ")/_emacs.d"
|
runemacs.applescript
|
set fileexists to do shell script "echo $(if [ -e ~/.emacs.d ];
|
runemacs.applescript
|
then echo 'yep';
|
runemacs.applescript
|
else echo 'nop'; fi)"
|
runemacs.applescript
|
if fileexists = "nop" then
|
runemacs.applescript
|
do shell script "ln -s " & emacs_d & " ~/.emacs.d"
|
runemacs.applescript
|
set target_d to do shell script "echo $(readlink ~/.emacs.d)"
|
runemacs.applescript
|
if not target_d = emacs_d then
|
runemacs.applescript
|
do shell script "export dtime=`date +%Y-%m-%d_%H-%M-%S`;
|
runemacs.applescript
|
mv ~/.emacs.d ~/.emacs.d-$dtime;
|
runemacs.applescript
|
ln -s " & emacs_d & " ~/.emacs.d"
|
runemacs.applescript
|
set emacs_bin to do shell script "echo $(if [[ `sw_vers -productVersion` == 10.6* ]];
|
runemacs.applescript
|
then echo 'Emacs-10.4';
|
runemacs.applescript
|
else echo 'Emacs-10.7'; fi)"
|
runemacs.applescript
|
do shell script "export PATH=/usr/local/git/bin:${PATH};
|
runemacs.applescript
|
export MYEMACSDIR=" & emacs_d & ";
|
runemacs.applescript
|
/Applications/Emacs.app/Contents/MacOS/" & emacs_bin & " -l ${MYEMACSDIR}/_emacs.mac"
|
runemacs.applescript
|
on run {input, parameters}
|
firefoxURLtoThings.applescript
|
tell application "Firefox" to activate
|
firefoxURLtoThings.applescript
|
keystroke "l" using command down
|
firefoxURLtoThings.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.