text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell application "Google Chrome" to tell tab 1 of thisWind to close
|
ombt.applescript
|
else if currBrowser is "Safari" then
|
ombt.applescript
|
make new document at end of documents with properties {URL:currUrl}
|
ombt.applescript
|
make new tab at end of tabs with properties {URL:currUrl}
|
ombt.applescript
|
log "Please enter a valid path for a textfile"
|
ombt.applescript
|
log "Usage: osascript ombt.applescript [browser_name] [path_of_text_file_containing_links]"
|
ombt.applescript
|
"1" is in "123"
|
"1" is in "123".applescript
|
if version begins with "3." then
|
Send to Instapaper.applescript
|
set myPrefDomain to "com.devon-technologies.think3"
|
Send to Instapaper.applescript
|
set myPrefDomain to "com.devon-technologies.thinkpro2"
|
Send to Instapaper.applescript
|
set myTitle to "Send to Instapaper"
|
Send to Instapaper.applescript
|
set username to ""
|
Send to Instapaper.applescript
|
set passwd to ""
|
Send to Instapaper.applescript
|
on urlencode(input)
|
Send to Instapaper.applescript
|
return do shell script "php -r 'echo trim(urlencode(" & "\"" & input & "" & "\"));'"
|
Send to Instapaper.applescript
|
on isOptionKeyPressed()
|
Send to Instapaper.applescript
|
return (do shell script "/usr/bin/python -c 'import Cocoa; print Cocoa.NSEvent.modifierFlags() & Cocoa.NSAlternateKeyMask > 1'") is "True"
|
Send to Instapaper.applescript
|
end isOptionKeyPressed
|
Send to Instapaper.applescript
|
on getCredentials()
|
Send to Instapaper.applescript
|
set my username to do shell script "defaults read " & my myPrefDomain & " InstapaperUsername"
|
Send to Instapaper.applescript
|
set my passwd to do shell script "defaults read " & my myPrefDomain & " InstapaperPassword"
|
Send to Instapaper.applescript
|
on error errnum
|
Send to Instapaper.applescript
|
set my username to ""
|
Send to Instapaper.applescript
|
set my passwd to ""
|
Send to Instapaper.applescript
|
end getCredentials
|
Send to Instapaper.applescript
|
on resetCredentials()
|
Send to Instapaper.applescript
|
do shell script "defaults delete " & myPrefDomain & " InstapaperUsername"
|
Send to Instapaper.applescript
|
do shell script "defaults delete " & myPrefDomain & " InstapaperPassword"
|
Send to Instapaper.applescript
|
display alert (localized string "Instapaper credentials reset") message (localized string "The saved Instapaper username and password have been deleted. Please re-enter your credentials to use this functionality.") as informational buttons {localized string "Cancel", localized string "Continue"} default button 2 cancel button 1
|
Send to Instapaper.applescript
|
end resetCredentials
|
Send to Instapaper.applescript
|
on credentialsAreValid(username, passwd)
|
Send to Instapaper.applescript
|
if username is equal to "" or passwd is equal to "" then return false
|
Send to Instapaper.applescript
|
set instapaperURL to "https://www.instapaper.com/api/authenticate?username=" & username & "&password=" & passwd
|
Send to Instapaper.applescript
|
set returnValue to do shell script "curl --get '" & instapaperURL & "'"
|
Send to Instapaper.applescript
|
if returnValue is equal to "200" then return true
|
Send to Instapaper.applescript
|
end credentialsAreValid
|
Send to Instapaper.applescript
|
on askForCredentials()
|
Send to Instapaper.applescript
|
tell application id "DNtp" to set credentials to display authentication dialog (localized string "Please enter your Instapaper credentials.")
|
Send to Instapaper.applescript
|
set my username to user of the credentials
|
Send to Instapaper.applescript
|
set my passwd to |password| of the credentials
|
Send to Instapaper.applescript
|
do shell script "defaults write " & my myPrefDomain & " InstapaperUsername " & quoted form of my username
|
Send to Instapaper.applescript
|
do shell script "defaults write " & my myPrefDomain & " InstapaperPassword " & quoted form of my passwd
|
Send to Instapaper.applescript
|
end askForCredentials
|
Send to Instapaper.applescript
|
on sendDEVONthinkSelectionToInstapaper()
|
Send to Instapaper.applescript
|
tell application id "DNtp" to set thisSelection to the selection
|
Send to Instapaper.applescript
|
if thisSelection is {} then
|
Send to Instapaper.applescript
|
error localized string "Please select at least one document, then try again."
|
Send to Instapaper.applescript
|
tell application id "DNtp" to show progress indicator (localized string "Sending to Instapaper") steps (count of thisSelection) with cancel button
|
Send to Instapaper.applescript
|
repeat with aRecord in thisSelection
|
Send to Instapaper.applescript
|
if cancelled progress then exit repeat -- Check if the user clicked the cancel button
|
Send to Instapaper.applescript
|
set theURL to URL of aRecord
|
Send to Instapaper.applescript
|
set theTitle to name of aRecord
|
Send to Instapaper.applescript
|
if theURL is not equal to "" then
|
Send to Instapaper.applescript
|
my addToInstapaper(my username, my passwd, theURL, theTitle)
|
Send to Instapaper.applescript
|
tell application id "DNtp" to hide progress indicator
|
Send to Instapaper.applescript
|
end sendDEVONthinkSelectionToInstapaper
|
Send to Instapaper.applescript
|
on addToInstapaper(username, passwd, theURL, theTitle)
|
Send to Instapaper.applescript
|
set instapaperURL to "https://www.instapaper.com/api/add?username=" & username & "&password=" & passwd & "&url=" & urlencode(theURL)
|
Send to Instapaper.applescript
|
if theTitle is not equal to "" then set instapaperURL to instapaperURL & "&title=" & urlencode(theTitle)
|
Send to Instapaper.applescript
|
end addToInstapaper
|
Send to Instapaper.applescript
|
if isOptionKeyPressed() then -- If the Option key was held, resent credentials; otherwise read them from the prefs
|
Send to Instapaper.applescript
|
resetCredentials()
|
Send to Instapaper.applescript
|
getCredentials()
|
Send to Instapaper.applescript
|
repeat while not credentialsAreValid(my username, my passwd) -- Ask for credentials
|
Send to Instapaper.applescript
|
askForCredentials()
|
Send to Instapaper.applescript
|
sendDEVONthinkSelectionToInstapaper() -- Send URLs of selected items to Instapaper
|
Send to Instapaper.applescript
|
property muteBtnTitle : "Mute audio"
|
zoom.1s.scpt
|
property videoBtnTitle : "Stop Video"
|
zoom.1s.scpt
|
property shareBtnTitle : "Start Share"
|
zoom.1s.scpt
|
if exists (menu item MuteBtnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
|
zoom.1s.scpt
|
set muteState to "LIVE MIC"
|
zoom.1s.scpt
|
set muteState to "MUTED"
|
zoom.1s.scpt
|
if exists (menu item videoBtnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
|
zoom.1s.scpt
|
set videoState to "VIDEO ACTIVE"
|
zoom.1s.scpt
|
set pad1 to " "
|
zoom.1s.scpt
|
set videoState to "NO VIDEO"
|
zoom.1s.scpt
|
if exists (menu item shareBtnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
|
zoom.1s.scpt
|
set shareState to ""
|
zoom.1s.scpt
|
set pad2 to ""
|
zoom.1s.scpt
|
set shareState to "SCREEN SHARE ACTIVE"
|
zoom.1s.scpt
|
set pad2 to " "
|
zoom.1s.scpt
|
set muteState to ""
|
zoom.1s.scpt
|
set videoState to ""
|
zoom.1s.scpt
|
set pad1 to ""
|
zoom.1s.scpt
|
return shareState & pad2 & videoState & pad1 & muteState & "| size=18
|
zoom.1s.scpt
|
Mute/Video/Screen State for Zoom"
|
zoom.1s.scpt
|
set exampleDate to current date
|
timestamp.applescript
|
copy {1993, 4, 10, 10 * 60 * 60 + 120 + 42} to {year of exampleDate, day of exampleDate, month of exampleDate, time of exampleDate}
|
timestamp.applescript
|
log timestamp(exampleDate, 1)
|
timestamp.applescript
|
log timestamp(exampleDate, 2)
|
timestamp.applescript
|
log timestamp(exampleDate, 3)
|
timestamp.applescript
|
log timestamp(exampleDate, 4)
|
timestamp.applescript
|
log timestamp(exampleDate, 5)
|
timestamp.applescript
|
open location "http://english.stackexchange.com/search?q=" & argv
|
enstack.applescript
|
on openInSublime(theFiles)
|
Open In Sublime Text 2.applescript
|
open theFiles
|
Open In Sublime Text 2.applescript
|
set theSelection to folder of the front window as string
|
Open In Sublime Text 2.applescript
|
set theSelection to selection as alias list
|
Open In Sublime Text 2.applescript
|
openInSublime(theSelection)
|
Open In Sublime Text 2.applescript
|
on open(theFiles)
|
Open In Sublime Text 2.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.