text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set endItems to text of text item -1 of currentHandler | insert-dynamic-handler-description.applescript |
set AppleScript's text item delimiters to "(" | insert-dynamic-handler-description.applescript |
set currentHandler to beginningToEnd | insert-dynamic-handler-description.applescript |
set handlerDescrip to "-- @description" & return & "-- [[template:description]]" & return & "--" & return | insert-dynamic-handler-description.applescript |
set theHandler to first script handler whose name is currentHandler | insert-dynamic-handler-description.applescript |
tell theHandler | insert-dynamic-handler-description.applescript |
repeat with i in handler parameters | insert-dynamic-handler-description.applescript |
set handlerDescrip to handlerDescrip & "-- @param $" & name of i & " - [[template:description]]" & return | insert-dynamic-handler-description.applescript |
set handlerDescrip to handlerDescrip & "--" & return | insert-dynamic-handler-description.applescript |
do shell script "echo " & quoted form of handlerDescrip & " > " & clipPath | insert-dynamic-handler-description.applescript |
tell process "Script Debugger" | insert-dynamic-handler-description.applescript |
click (first menu item of menu 1 of menu item 2 of menu 1 of menu bar item 10 of menu bar 1 whose name is "handler description") | insert-dynamic-handler-description.applescript |
property JournalPath : "/path/to/journal.txt" -- full path to journal | Import%20Journal%20to%20Evernote.scpt |
property JournalNotebook : "" -- Existing Evernote notebook. Empty for default notebook | Import%20Journal%20to%20Evernote.scpt |
set JournalText to my readFile(JournalPath) | Import%20Journal%20to%20Evernote.scpt |
set JournalParagraphs to every paragraph of JournalText | Import%20Journal%20to%20Evernote.scpt |
set noteText to "" | Import%20Journal%20to%20Evernote.scpt |
set noteCreated to missing value | Import%20Journal%20to%20Evernote.scpt |
repeat with OneParagraph in JournalParagraphs | Import%20Journal%20to%20Evernote.scpt |
set TheParagraph to (text of OneParagraph) | Import%20Journal%20to%20Evernote.scpt |
if (length of TheParagraph) < 16 then | Import%20Journal%20to%20Evernote.scpt |
set JournalDate to missing value | Import%20Journal%20to%20Evernote.scpt |
set t to my StringLeft(TheParagraph, 16) | Import%20Journal%20to%20Evernote.scpt |
set JournalDate to my ISODateStrToDate(t) | Import%20Journal%20to%20Evernote.scpt |
if not (JournalDate is missing value) then | Import%20Journal%20to%20Evernote.scpt |
if (not noteText is "") then -- not for first item | Import%20Journal%20to%20Evernote.scpt |
my CreateNote(noteTitle, noteText, noteCreated) | Import%20Journal%20to%20Evernote.scpt |
set noteTitle to TheParagraph | Import%20Journal%20to%20Evernote.scpt |
set noteText to TheParagraph | Import%20Journal%20to%20Evernote.scpt |
set noteCreated to JournalDate | Import%20Journal%20to%20Evernote.scpt |
set noteText to (noteText & " | Import%20Journal%20to%20Evernote.scpt |
" & TheParagraph) -- append text | Import%20Journal%20to%20Evernote.scpt |
on readFile(unixPath) | Import%20Journal%20to%20Evernote.scpt |
set foo to (open for access (POSIX file unixPath)) | Import%20Journal%20to%20Evernote.scpt |
set txt to (read foo for (get eof foo) as «class utf8») | Import%20Journal%20to%20Evernote.scpt |
close access foo | Import%20Journal%20to%20Evernote.scpt |
to StringLeft(s, n) | Import%20Journal%20to%20Evernote.scpt |
return text 1 thru n of s | Import%20Journal%20to%20Evernote.scpt |
end StringLeft | Import%20Journal%20to%20Evernote.scpt |
to StringRight(s, n) | Import%20Journal%20to%20Evernote.scpt |
return text -n thru -1 of s | Import%20Journal%20to%20Evernote.scpt |
end StringRight | Import%20Journal%20to%20Evernote.scpt |
on ISODateStrToDate(theStr) | Import%20Journal%20to%20Evernote.scpt |
set savedDelimeters to AppleScript's text item delimiters | Import%20Journal%20to%20Evernote.scpt |
set AppleScript's text item delimiters to {"-", "T", " ", ":"} | Import%20Journal%20to%20Evernote.scpt |
set {dt's year, dt's month, dt's day, dt's hours, dt's minutes} to (every text item of theStr) | Import%20Journal%20to%20Evernote.scpt |
set AppleScript's text item delimiters to savedDelimeters | Import%20Journal%20to%20Evernote.scpt |
set dt's seconds to 0 | Import%20Journal%20to%20Evernote.scpt |
set dt to missing value | Import%20Journal%20to%20Evernote.scpt |
return dt | Import%20Journal%20to%20Evernote.scpt |
end ISODateStrToDate | Import%20Journal%20to%20Evernote.scpt |
on CreateNote(theTitle, theText, theDateCreated) | Import%20Journal%20to%20Evernote.scpt |
set n to create note with text theText title theTitle created theDateCreated notebook JournalNotebook | Import%20Journal%20to%20Evernote.scpt |
end CreateNote | Import%20Journal%20to%20Evernote.scpt |
" default items "CiPX" without multiple selections allowed and empty selection allowed | List Window.applescript |
return SelectedDeviceName | List Window.applescript |
fmGUI_Wait_MenuItemAvailable({menuItemRef:copyMenuItem}) | fmGUI_Wait_MenuItemAvailable.applescript |
if menuItemRef of prefs is null then error "menuItemRef not specified" number -1024 | fmGUI_Wait_MenuItemAvailable.applescript |
repeat ((maxTimeoutSec of prefs) / (checkFrequencySec of prefs) as integer) times | fmGUI_Wait_MenuItemAvailable.applescript |
if fmGUI_MenuItemAvailable({menuItemRef:menuItemRef of prefs}) then return true | fmGUI_Wait_MenuItemAvailable.applescript |
error "Couldn't fmGUI_Wait_MenuItemAvailable - " & errMsg number errNum | fmGUI_Wait_MenuItemAvailable.applescript |
tell application "htcLib" to fmGUI_MenuItemAvailable({menuItemRef:my coerceToString(menuItemRef of prefs)} & prefs) | fmGUI_Wait_MenuItemAvailable.applescript |
property pTitle : "Completion Status" -- title of dialog box | Project completion percent.applescript |
property pLine : "-> " -- starting string for a line | Project completion percent.applescript |
property pEmpty : "-0-" -- three character string for empty projects | Project completion percent.applescript |
tell application id "OFOC" | Project completion percent.applescript |
tell front document window of default document | Project completion percent.applescript |
set its perspective name to "Projects" | Project completion percent.applescript |
repeat with oPanel in {content, sidebar} | Project completion percent.applescript |
set lstProj to (value of every tree of oPanel where (class of its value is project and status of its value is active)) | Project completion percent.applescript |
set lngProj to length of lstProj | Project completion percent.applescript |
if lngProj > 0 then exit repeat | Project completion percent.applescript |
if lngProj < 1 then return | Project completion percent.applescript |
repeat with oProj in lstProj | Project completion percent.applescript |
tell oProj | Project completion percent.applescript |
set strn to " : " & its name | Project completion percent.applescript |
set lngDone to 0 | Project completion percent.applescript |
set lstTasks to the (flattened tasks of oProj as list) | Project completion percent.applescript |
set lngTasks to number of items in lstTasks | Project completion percent.applescript |
if lngTasks > 0 then | Project completion percent.applescript |
repeat with oTask in lstTasks | Project completion percent.applescript |
if oTask is completed then | Project completion percent.applescript |
set lngDone to lngDone + 1 | Project completion percent.applescript |
set pcTask to (((lngDone / lngTasks) * 100) as integer) | Project completion percent.applescript |
if (pcTask < 10) then | Project completion percent.applescript |
set strp to pLine & " " & (pcTask as string) & "%" & tab | Project completion percent.applescript |
else if (pcTask < 100) then | Project completion percent.applescript |
set strp to pLine & " " & (pcTask as string) & "%" & tab | Project completion percent.applescript |
set strp to pLine & (pcTask as string) & "%" & tab | Project completion percent.applescript |
set strp to pLine & pEmpty & tab | Project completion percent.applescript |
set str to str & strp & strn & return | Project completion percent.applescript |
display dialog str buttons {"OK"} default button "OK" with title pTitle | Project completion percent.applescript |
set white_list to {"Finder", "TextExpander", "iTunes", "Transmit", "iTerm", "uTorrent", "Pathfinder"} | hideall.scpt |
set visible of process this_process to false | hideall.scpt |
set inputVolume to input volume of (get volume settings) | mic-control.applescript |
if inputVolume = 0 then | mic-control.applescript |
set inputVolume to 100 | mic-control.applescript |
display notification "The microphone is now live" with title "Shush" subtitle "Microphone control" | mic-control.applescript |
set inputVolume to 0 | mic-control.applescript |
display notification "The microphone is now muted" with title "Shush" subtitle "Microphone control" | mic-control.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.