text
stringlengths
0
15.7k
source
stringlengths
6
112
default button "OK" giving up after 30)
Finder2Terminal-selectedFolder.applescript
if ddButton = "Copy Error Message" then set the clipboard to e
Finder2Terminal-selectedFolder.applescript
on adding folder items to this_folder after receiving these_items
ffmpeg-mov-mp4-origin.applescript
if not (exists folder "converted" of this_folder) then
ffmpeg-mov-mp4-origin.applescript
make new folder at this_folder with properties {name:"converted"}
ffmpeg-mov-mp4-origin.applescript
set the destination_folder to folder "converted" of this_folder as alias
ffmpeg-mov-mp4-origin.applescript
set the destination_directory to POSIX path of the destination_folder
ffmpeg-mov-mp4-origin.applescript
repeat with i from 1 to number of items in these_items
ffmpeg-mov-mp4-origin.applescript
set this_item to item i of these_items
ffmpeg-mov-mp4-origin.applescript
set the file_path to the POSIX path of this_item
ffmpeg-mov-mp4-origin.applescript
set base_name to do shell script "basename " & quoted form of file_path
ffmpeg-mov-mp4-origin.applescript
set ext to text -4 thru end of base_name
ffmpeg-mov-mp4-origin.applescript
set base_name to text 1 thru -5 of base_name
ffmpeg-mov-mp4-origin.applescript
if kind of (info for this_item) is not "folder" then
ffmpeg-mov-mp4-origin.applescript
set dest_file to destination_directory & "/" & base_name & ".mp4"
ffmpeg-mov-mp4-origin.applescript
do shell script "/usr/local/bin/ffmpeg -i " & quoted form of file_path & " " & quoted form of dest_file
ffmpeg-mov-mp4-origin.applescript
display notification "Video convertation completed" & base_name with title "ffmpeg"
ffmpeg-mov-mp4-origin.applescript
display dialog "Error: " & errStr
ffmpeg-mov-mp4-origin.applescript
return number
ffmpeg-mov-mp4-origin.applescript
end adding folder items to
ffmpeg-mov-mp4-origin.applescript
set chosenScript to "Sentences.scpt" -- File to Be Refernce
Sentences-Selector.scpt
set homeDirectory to {POSIX path of home directory} of (system info) -- Get User's Home Directory
Sentences-Selector.scpt
set scriptPath to (homeDirectory & "Scripts/TTS/ScriptFiles/Sentences/") -- Folder Path
Sentences-Selector.scpt
set chosenScriptPath to scriptPath & chosenScript -- Full Path
Sentences-Selector.scpt
set ChosenScriptLoad to (load script (scriptPath as text) & chosenScript) -- *load script* command to the File
Sentences-Selector.scpt
do shell script "osascript " & chosenScriptPath ------ Run the <chosenScript.scpt> once to update it's variabels.
Sentences-Selector.scpt
get the inSoundBarR of ChosenScriptLoad
Sentences-Selector.scpt
set selectedSentence to result
Sentences-Selector.scpt
return selectedSentence
Sentences-Selector.scpt
repeat with theRecord in theRecords
Add Linked Images to Download Manager.applescript
set theDatabase to database of theRecord
Add Linked Images to Download Manager.applescript
set theSource to source of theRecord
Add Linked Images to Download Manager.applescript
set theURL to URL of theRecord
Add Linked Images to Download Manager.applescript
set isInstagram to false
Add Linked Images to Download Manager.applescript
set isWebsta to false
Add Linked Images to Download Manager.applescript
set isFlickr to false
Add Linked Images to Download Manager.applescript
set isFacebook to false
Add Linked Images to Download Manager.applescript
if theURL contains "facebook." and theURL contains "/photos/" then
Add Linked Images to Download Manager.applescript
set theSource to download markup from theURL
Add Linked Images to Download Manager.applescript
set isFacebook to true
Add Linked Images to Download Manager.applescript
else if theURL contains "instagram." then
Add Linked Images to Download Manager.applescript
set isInstagram to true
Add Linked Images to Download Manager.applescript
else if theURL contains "websta." then
Add Linked Images to Download Manager.applescript
set isWebsta to true
Add Linked Images to Download Manager.applescript
else if theURL contains "flickr." and theURL contains "/photos/" then
Add Linked Images to Download Manager.applescript
set isFlickr to true
Add Linked Images to Download Manager.applescript
if isFlickr or isFacebook or isWebsta then my checkLinks(get embedded images of theSource base URL theURL, isFlickr, isFacebook, isInstagram, isWebsta, theURL, theDatabase)
Add Linked Images to Download Manager.applescript
my checkLinks(get links of theSource base URL theURL, isFlickr, isFacebook, isInstagram, isWebsta, theURL, theDatabase)
Add Linked Images to Download Manager.applescript
on checkLinks(theLinks, isFlickr, isFacebook, isInstagram, isWebsta, theReferrer, theDatabase)
Add Linked Images to Download Manager.applescript
local add, thisLink
Add Linked Images to Download Manager.applescript
repeat with thisLink in theLinks
Add Linked Images to Download Manager.applescript
if thisLink contains ".jpg" or thisLink contains ".JPG" or thisLink contains ".jpeg" or thisLink contains ".JPEG" or thisLink contains ".jp2" or thisLink contains ".JP2" or thisLink contains "_n.png" then
Add Linked Images to Download Manager.applescript
if thisLink does not contain "32x32" and thisLink does not contain "128x128" and thisLink does not contain "150x150" and thisLink does not contain "306x306" then
Add Linked Images to Download Manager.applescript
set add to false
Add Linked Images to Download Manager.applescript
if isFlickr then
Add Linked Images to Download Manager.applescript
if thisLink does not contain "_n.jpg" and thisLink does not contain "/buddyicons/" then set add to true
Add Linked Images to Download Manager.applescript
else if isWebsta then
Add Linked Images to Download Manager.applescript
if thisLink contains "s320x320" then set thisLink to my replaceText(thisLink, "s320x320", "s1080x1080")
Add Linked Images to Download Manager.applescript
set add to true
Add Linked Images to Download Manager.applescript
else if not isFacebook and not isInstagram then
Add Linked Images to Download Manager.applescript
else if thisLink contains "_n.jpg" or thisLink contains "_n.png" or thisLink contains "_o.jpg?dl=1" or thisLink contains "_o.png?dl=1" then
Add Linked Images to Download Manager.applescript
if add and not (exists record with URL thisLink in theDatabase) then add download thisLink referrer theReferrer
Add Linked Images to Download Manager.applescript
end checkLinks
Add Linked Images to Download Manager.applescript
on replaceText(theString, find, replace)
Add Linked Images to Download Manager.applescript
if theString contains find then
Add Linked Images to Download Manager.applescript
local od
Add Linked Images to Download Manager.applescript
set od to text item delimiters of AppleScript
Add Linked Images to Download Manager.applescript
set theString to text items of theString
Add Linked Images to Download Manager.applescript
set theString to "" & theString
Add Linked Images to Download Manager.applescript
set text item delimiters of AppleScript to od
Add Linked Images to Download Manager.applescript
tell application "Safari" to activate
Click somewhere.applescript
click at {300, 100} -- {from left, from top}
Click somewhere.applescript
minNum({1, 6, 2, 6, -1, 0.1, -5.9})
minNum.applescript
on minNum(someList)
minNum.applescript
if class of someList is not list then error "not a list." number -1703
minNum.applescript
set smallestFound to item 1 of someList as number
minNum.applescript
repeat with i in someList
minNum.applescript
set oneValue to i's contents as number
minNum.applescript
if oneValue < smallestFound then set smallestFound to oneValue
minNum.applescript
return smallestFound
minNum.applescript
error "unable to minNum - " & errMsg number errNum
minNum.applescript
end minNum
minNum.applescript
tell application "Adobe InDesign CS4"
Script 26-1.applescript
tell document preferences
Script 26-1.applescript
set page height to "8i"
Script 26-1.applescript
set page width to "6i"
Script 26-1.applescript
property lsVer : "1.2"
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
property strCreationDate : "Jan 7, 2016"
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
set lsProcessTitle to "Evernote Set Creation Date " & lsVer
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
activate application "Evernote"
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
keystroke "c" using command down -- Simulate CMD-C
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
set strCreationDate to (the clipboard as text)
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
try -- Try Standard U.S. date format --
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
set dCreationDate to date (strCreationDate)
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
on error --- Try International Date format (YYYY-MM-DD)
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
set dCreationDate to convertIntlDate(strCreationDate)
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
set _sel to selection -- Gets the Note(s) Selected in Evernote
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
if _sel ≠ {} then
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
set aNote to first item of _sel -- Get ONLY the 1st Note
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript
set creation date of aNote to dCreationDate
EN%20Set%20Note%20Creation%20Date%20from%20Selection%20AS.applescript