text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
end retrieveHeaders
|
00 Retrieve metadata headers.applescript
|
on multilineHeader(theScript, theHeader)
|
00 Retrieve metadata headers.applescript
|
set inTheHeader to false
|
00 Retrieve metadata headers.applescript
|
set theHeaderContents to ""
|
00 Retrieve metadata headers.applescript
|
global testVar
|
00 Retrieve metadata headers.applescript
|
if eachLine is "" then
|
00 Retrieve metadata headers.applescript
|
log "2 " & eachLine
|
00 Retrieve metadata headers.applescript
|
else if theHeader is in eachLine then
|
00 Retrieve metadata headers.applescript
|
set inTheHeader to true
|
00 Retrieve metadata headers.applescript
|
log "1 " & eachLine
|
00 Retrieve metadata headers.applescript
|
else if inTheHeader is true then
|
00 Retrieve metadata headers.applescript
|
set theHeaderContents to theHeaderContents & util's trimLine(eachLine, "-- ", 0) & "
|
00 Retrieve metadata headers.applescript
|
log "3 " & eachLine
|
00 Retrieve metadata headers.applescript
|
set testVar to eachLine
|
00 Retrieve metadata headers.applescript
|
global aGlobalVar
|
00 Retrieve metadata headers.applescript
|
set aGlobalVar to theHeaderContents
|
00 Retrieve metadata headers.applescript
|
end multilineHeader
|
00 Retrieve metadata headers.applescript
|
on findHeaders(theScript)
|
00 Retrieve metadata headers.applescript
|
end findHeaders
|
00 Retrieve metadata headers.applescript
|
log headerOptions
|
00 Retrieve metadata headers.applescript
|
set scriptFile to choose file
|
00 Retrieve metadata headers.applescript
|
retrieveHeaders(scriptFile)
|
00 Retrieve metadata headers.applescript
|
to makeTextView at origin given dimensions:dimensions : {200, 28}, textString:textString : "Testing", textFont:textFont : missing value, textColor:textColor : missing value, backgroundColor:backgroundColor : missing value, drawsBackground:drawsBackground : missing value, editable:editable : missing value, selectable:selectable : missing value
|
NSTextView.applescript
|
tell (current application's NSTextView's alloc's initWithFrame:{origin, dimensions})
|
NSTextView.applescript
|
its setAutoresizingMask:(current application's NSViewWidthSizable)
|
NSTextView.applescript
|
its setHorizontallyResizable:true
|
NSTextView.applescript
|
if textColor is not missing value then its setTextColor:textColor
|
NSTextView.applescript
|
if drawsBackground is not missing value then its setDrawsBackground:drawsBackground
|
NSTextView.applescript
|
if editable is not missing value then its setEditable:editable
|
NSTextView.applescript
|
if selectable is not missing value then its setSelectable:selectable
|
NSTextView.applescript
|
its setString:textString
|
NSTextView.applescript
|
end makeTextView
|
NSTextView.applescript
|
to makeScrollView for textView given borderType:borderType : missing value, verticalScroller:verticalScroller : false
|
NSTextView.applescript
|
if textView is missing value then return missing value
|
NSTextView.applescript
|
tell (current application's NSScrollView's alloc's initWithFrame:(textView's frame))
|
NSTextView.applescript
|
its setAutoresizingMask:(((current application's NSViewWidthSizable) as integer) + ((current application's NSViewHeightSizable) as integer))
|
NSTextView.applescript
|
if borderType is not missing value then its setBorderType:borderType -- 0-3 or NSBorderType enum
|
NSTextView.applescript
|
if verticalScroller is not in {false, missing value} then its setHasVerticalScroller:true
|
NSTextView.applescript
|
if hidingScrollers is not in {false, missing value} then its setAutohidesScrollers:true
|
NSTextView.applescript
|
its setDocumentView:textView
|
NSTextView.applescript
|
end makeScrollView
|
NSTextView.applescript
|
to setWrapMode for textView given wrapping:wrapping : true
|
NSTextView.applescript
|
if wrapping is true then -- wrap at textView width
|
NSTextView.applescript
|
set layoutSize to current application's NSMakeSize(first item of (textView's enclosingScrollView's contentSize() as list), 1.0E+4)
|
NSTextView.applescript
|
textView's enclosingScrollView's setHasHorizontalScroller:false
|
NSTextView.applescript
|
textView's textContainer's setWidthTracksTextView:true
|
NSTextView.applescript
|
else -- no wrapping
|
NSTextView.applescript
|
set layoutSize to current application's NSMakeSize(1.0E+4, 1.0E+4)
|
NSTextView.applescript
|
textView's setMaxSize:layoutSize
|
NSTextView.applescript
|
textView's enclosingScrollView's setHasHorizontalScroller:true
|
NSTextView.applescript
|
textView's textContainer's setWidthTracksTextView:false
|
NSTextView.applescript
|
textView's textContainer's setContainerSize:layoutSize
|
NSTextView.applescript
|
textView's enclosingScrollView's setNeedsDisplay:true
|
NSTextView.applescript
|
return wrapping
|
NSTextView.applescript
|
end setWrapMode
|
NSTextView.applescript
|
set num to theNumber as integer
|
LIB_Text.applescript
|
if num < 0 then set num to num * -1
|
LIB_Text.applescript
|
on decode_text(this_text)
|
LIB_Text.applescript
|
set the end of the character_list to my decode_chars(("%" & temp_char & this_char) as string)
|
LIB_Text.applescript
|
end decode_text
|
LIB_Text.applescript
|
on decode_chars(these_chars)
|
LIB_Text.applescript
|
end decode_chars
|
LIB_Text.applescript
|
on stripToInteger(someText)
|
LIB_Text.applescript
|
set TextItems to text items of (someText as string)
|
LIB_Text.applescript
|
repeat with i in TextItems
|
LIB_Text.applescript
|
set end of myResult to (i as integer)
|
LIB_Text.applescript
|
myResult as string
|
LIB_Text.applescript
|
end stripToInteger
|
LIB_Text.applescript
|
to listToText(theList)
|
LIB_Text.applescript
|
end listToText
|
LIB_Text.applescript
|
to recordToString(theRecord)
|
LIB_Text.applescript
|
theRecord as string
|
LIB_Text.applescript
|
set recString to textBetween(errMessage, "{", "}")
|
LIB_Text.applescript
|
return "{" & recString & "}"
|
LIB_Text.applescript
|
end recordToString
|
LIB_Text.applescript
|
on patternCount(theText, matchString)
|
LIB_Text.applescript
|
set AppleScript's text item delimiters to {matchString}
|
LIB_Text.applescript
|
set countedPattern to count of text items of theText
|
LIB_Text.applescript
|
return countedPattern - 1
|
LIB_Text.applescript
|
on findAndReplace(sourceString, searchString, substitutionString)
|
LIB_Text.applescript
|
set lengthOfSearchString to length of searchString
|
LIB_Text.applescript
|
set positionOfMatch to offset of searchString in sourceString
|
LIB_Text.applescript
|
if positionOfMatch is equal to 0 then
|
LIB_Text.applescript
|
else if positionOfMatch is 1 then
|
LIB_Text.applescript
|
set sourceString to substitutionString & (characters (positionOfMatch + (length of searchString)) thru (length of sourceString) of sourceString) as string
|
LIB_Text.applescript
|
else if positionOfMatch is equal to (length of sourceString) then
|
LIB_Text.applescript
|
set sourceString to ((characters 1 thru (positionOfMatch - (length of searchString)) of sourceString) as string) & substitutionString
|
LIB_Text.applescript
|
set sourceString to ((characters 1 thru (positionOfMatch - 1) of sourceString) as string) & substitutionString & (characters (positionOfMatch + (length of searchString)) thru (length of sourceString) of sourceString) as string
|
LIB_Text.applescript
|
return sourceString
|
LIB_Text.applescript
|
on textBetween(theText, openDelim, closeDelim)
|
LIB_Text.applescript
|
if openDelim is "" then
|
LIB_Text.applescript
|
set oStart to 1
|
LIB_Text.applescript
|
set oStart to offset of openDelim in theText
|
LIB_Text.applescript
|
if oStart = 0 then return ""
|
LIB_Text.applescript
|
set oStart to oStart + (length of openDelim)
|
LIB_Text.applescript
|
if closeDelim is "" then
|
LIB_Text.applescript
|
set oEnd to (length of theText)
|
LIB_Text.applescript
|
set oEnd to offset of closeDelim in (text (oStart + 1) thru (length of theText) of theText)
|
LIB_Text.applescript
|
if oEnd = 0 then return ""
|
LIB_Text.applescript
|
set oEnd to oEnd + oStart - 1
|
LIB_Text.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.