text
stringlengths
0
15.7k
source
stringlengths
6
112
Heikki Rauhala / HWC
jasenmaksut_2015.applescript
jasenmaksut_2015.applescript
http://helsinkiwindsurfingclub.fi/
jasenmaksut_2015.applescript
https://www.facebook.com/groups/helsinkiwindsurfingclub/
jasenmaksut_2015.applescript
make new to recipient with properties {address:recipientAddress}
jasenmaksut_2015.applescript
tell application "Google Chrome" to set w to (make new window)
Open%20All%20Tabs%20In%20Chrome.scpt
set _tabs to (URL of every tab of window 1)
Open%20All%20Tabs%20In%20Chrome.scpt
repeat with t in _tabs
Open%20All%20Tabs%20In%20Chrome.scpt
tell application "Google Chrome" to tell w to make new tab with properties {URL:t}
Open%20All%20Tabs%20In%20Chrome.scpt
 on round_to_decimal_places(the_number_to_round, the_decimal_precision)
Script 8-2.applescript
set multiplier to 10 ^ the_decimal_precision
Script 8-2.applescript
the_number_to_round * multiplier
Script 8-2.applescript
round result
Script 8-2.applescript
return result / multiplier
Script 8-2.applescript
end round_to_decimal_places
Script 8-2.applescript
the clipboard
the clipboard.applescript
to getScriptEditorDocumentFor(myFileRef)
scriptAsApplesript.applescript
tell application "Finder" to set myAlias to myFileRef as alias
scriptAsApplesript.applescript
tell application "AppleScript Editor"
scriptAsApplesript.applescript
set docs to every document whose path is (POSIX path of myAlias)
scriptAsApplesript.applescript
return item 1 of docs
scriptAsApplesript.applescript
end getScriptEditorDocumentFor
scriptAsApplesript.applescript
set sourceFolder to alias "Macintosh HD:Users:ryan:SCRIPTS_AS_SCRIPTS/"
scriptAsApplesript.applescript
set destinationFolder to "/Users/ryan/Desktop/SCRIPTS_AS_APPLESCRIPTS/"
scriptAsApplesript.applescript
set myFileList to every file in sourceFolder
scriptAsApplesript.applescript
repeat with currFile in myFileList
scriptAsApplesript.applescript
set theNameWithExt to name of currFile
scriptAsApplesript.applescript
set theExtension to name extension of currFile
scriptAsApplesript.applescript
tell me to set theName to replace_chars(theNameWithExt, theExtension, "")
scriptAsApplesript.applescript
log currFile
scriptAsApplesript.applescript
open currFile
scriptAsApplesript.applescript
tell me to set d to getScriptEditorDocumentFor(currFile)
scriptAsApplesript.applescript
save d as "text" in POSIX file (((destinationFolder & theName as string) & "applescript") as string) -- with run only
scriptAsApplesript.applescript
close window 1
scriptAsApplesript.applescript
property growlHelperAppName : ""
Generic Growl Code.scpt
on notifyWithGrowlMethod2(growlHelperAppName, alertName, alertTitle, alertText, useSticky)
Generic Growl Code.scpt
if useSticky then
Generic Growl Code.scpt
set osascript to "property growlAppName : \"" & growlAppName & "\"
Generic Growl Code.scpt
property allNotifications : " & dictToString(allNotifications) & "
Generic Growl Code.scpt
property enabledNotifications : " & dictToString(enabledNotifications) & "
Generic Growl Code.scpt
property iconApplication : \"" & iconApplication & "\"
Generic Growl Code.scpt
tell application \"" & growlHelperAppName & "\"
Generic Growl Code.scpt
register as application growlAppName all notifications allNotifications default notifications enabledNotifications icon of application iconApplication
Generic Growl Code.scpt
notify with name \"" & alertName & "\" title \"" & alertTitle & "\" application name growlAppName description \"" & alertText & "\" with sticky
Generic Growl Code.scpt
notify with name \"" & alertName & "\" title \"" & alertTitle & "\" application name growlAppName description \"" & alertText & "\"
Generic Growl Code.scpt
set shellScript to "osascript -e " & quoted form of osascript & " &> /dev/null &"
Generic Growl Code.scpt
ignoring application responses
Generic Growl Code.scpt
do shell script shellScript
Generic Growl Code.scpt
end notifyWithGrowlMethod2
Generic Growl Code.scpt
my notifyWithSticky("General", "Title", "Body")
Generic Growl Code.scpt
set applaunch to text returned of (display dialog "" default answer "" buttons {"Go"} default button "Go")
AppKiller.applescript
if applaunch contains "" then
AppKiller.applescript
else if applaunch contains applaunch then
AppKiller.applescript
tell application applaunch
AppKiller.applescript
set {procesList, pidList} to the {name, unix id} of (every process whose name contains applaunch)
AppKiller.applescript
if procesList contains applaunch then
AppKiller.applescript
do shell script "kill -KILL " & pidList
AppKiller.applescript
getTIFF("my bitmap").getRow(3).getPixel(7);
TIFF_Pseudocode_V1.applescript
set validSelectedItemsList to value of (selected trees where class of its value is not item and class of its value is not folder and class of its value is not tag and class of its value is not perspective)
project_notes.applescript
display notification "No tasks or projects selected" with title "Error"
project_notes.applescript
if totalItems > 1 then
project_notes.applescript
display notification "Multiple items selected." with title "Error"
project_notes.applescript
repeat with myTask in validSelectedItemsList
project_notes.applescript
if myTask's class is task then
project_notes.applescript
set theProject to myTask's containing project
project_notes.applescript
set theProject to myTask
project_notes.applescript
set noteURLs to (every paragraph of theProject's note where it starts with (my NOTE_SHORTCUTS_URL_PREFIX))
project_notes.applescript
if (count of noteURLs) is 0 then
project_notes.applescript
set taskUrl to "omnifocus:///task/" & (theProject's id)
project_notes.applescript
set noteBody to "<h1>" & theProject's name & "</h1><p><a href=" & taskUrl & ">" & taskUrl & "</a></p><ul><li></li></ul>"
project_notes.applescript
set newNote to make new note in default account at folder "Notes" with properties {body: noteBody}
project_notes.applescript
set noteId to «class seld» of (newNote as record)
project_notes.applescript
set noteURL to shortcutsScheme of (my getNoteUri(noteId))
project_notes.applescript
tell theProject
project_notes.applescript
insert noteURL & "
project_notes.applescript
" at before first paragraph of note
project_notes.applescript
set noteURL to first item in noteURLs
project_notes.applescript
open location noteURL
project_notes.applescript
set e to {¬ result_kind:note_kind,¬ result_file:"/System/Library/ScriptingDefinitions/CocoaStandard.sdef",¬ result_line:1,¬ message:"This browser will open"¬ }
open-bbedit-browser.applescript
make new results browser¬
open-bbedit-browser.applescript
with properties {name:"AppleScript Check"}¬
open-bbedit-browser.applescript
with data {e}
open-bbedit-browser.applescript
set dateList to {date ("2015-01-01"), date ("2014-01-01"), date ("2016-01-01")}
file1.txt
set array to current application's NSArray's arrayWithArray:dateList
file1.txt
set docList to choose file with multiple selections allowed
word2pdf.applescript
repeat with docItem in docList
word2pdf.applescript
set docRef to name of (info for docItem)
word2pdf.applescript
open docItem
word2pdf.applescript
set tempDocument to document docRef
word2pdf.applescript
set documentName to my modifyExtensionSurfix(docItem as string, ".pdf")
word2pdf.applescript
save as tempDocument file name documentName file format format PDF
word2pdf.applescript
close tempDocument saving no
word2pdf.applescript
on modifyExtensionSurfix(filePathText, targetExtension)
word2pdf.applescript
set completeFilePath to splitText(filePathText, ":")
word2pdf.applescript
set originalName to last item in completeFilePath
word2pdf.applescript
set modifiedName to first item in splitText(originalName, ".") & targetExtension
word2pdf.applescript
set last item in completeFilePath to modifiedName
word2pdf.applescript
return assemblyMacOSPath(completeFilePath)
word2pdf.applescript
end modifyExtensionSurfix
word2pdf.applescript
on assemblyMacOSPath(separatedFilePath)
word2pdf.applescript