text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set citekey of aPub to acitekey
|
changeCiteKey.scpt
|
global isize
|
getImgTagFromFlickrOnTheSafari.scpt
|
set format to "<a href=\"$lurl$\" target=\"_blank\"><img src=\"$url$\" width=\"$width$\" height=\"$height$\" /></a>"
|
getImgTagFromFlickrOnTheSafari.scpt
|
set isize to "m"
|
getImgTagFromFlickrOnTheSafari.scpt
|
if (my isRunning("Safari")) then
|
getImgTagFromFlickrOnTheSafari.scpt
|
set props to my getProps(isize)
|
getImgTagFromFlickrOnTheSafari.scpt
|
if (props is not equal to missing value) then
|
getImgTagFromFlickrOnTheSafari.scpt
|
set format to my replace(format, "$lurl$", (lurl of props))
|
getImgTagFromFlickrOnTheSafari.scpt
|
set format to my replace(format, "$url$", (furl of props))
|
getImgTagFromFlickrOnTheSafari.scpt
|
set format to my replace(format, "$width$", (width of props))
|
getImgTagFromFlickrOnTheSafari.scpt
|
set format to my replace(format, "$height$", (height of props))
|
getImgTagFromFlickrOnTheSafari.scpt
|
return format
|
getImgTagFromFlickrOnTheSafari.scpt
|
on hasWindow()
|
getImgTagFromFlickrOnTheSafari.scpt
|
tell app "safari"
|
getImgTagFromFlickrOnTheSafari.scpt
|
if ((count of documents) > 0) then
|
getImgTagFromFlickrOnTheSafari.scpt
|
end hasWindow
|
getImgTagFromFlickrOnTheSafari.scpt
|
on isFlickr()
|
getImgTagFromFlickrOnTheSafari.scpt
|
if (u begins with "http://www.flickr.com/photos/") then
|
getImgTagFromFlickrOnTheSafari.scpt
|
end isFlickr
|
getImgTagFromFlickrOnTheSafari.scpt
|
on getProps(itype)
|
getImgTagFromFlickrOnTheSafari.scpt
|
if (my hasWindow() and my isFlickr()) then
|
getImgTagFromFlickrOnTheSafari.scpt
|
set l to (do JavaScript "F.config.flickr.photo.sizes." & "l" & ".url" in document 1) as string
|
getImgTagFromFlickrOnTheSafari.scpt
|
set o to (do JavaScript "F.config.flickr.photo.sizes." & "o" & ".url" in document 1) as string
|
getImgTagFromFlickrOnTheSafari.scpt
|
set u to (do JavaScript "F.config.flickr.photo.sizes." & itype & ".url" in document 1) as string
|
getImgTagFromFlickrOnTheSafari.scpt
|
set w to (do JavaScript "F.config.flickr.photo.sizes." & itype & ".width" in document 1) as string
|
getImgTagFromFlickrOnTheSafari.scpt
|
set h to (do JavaScript "F.config.flickr.photo.sizes." & itype & ".height" in document 1) as string
|
getImgTagFromFlickrOnTheSafari.scpt
|
return {furl:u, lurl:l, ourl:o, width:w, height:h}
|
getImgTagFromFlickrOnTheSafari.scpt
|
end getProps
|
getImgTagFromFlickrOnTheSafari.scpt
|
set _headerRowIndex to 1
|
addColumnsByColor.applescript
|
set _dataRowStartIndex to _headerRowIndex + 1
|
addColumnsByColor.applescript
|
set _rangeSelectedText to "A1:V562"
|
addColumnsByColor.applescript
|
set _columnRecordList to {¬
{columnName:"Confirmed", columnIndex:"", colorTests:{¬
{colorIndex:4, colorName:"dkGreen", fieldValue:1} ¬
|
addColumnsByColor.applescript
|
}}, ¬
|
addColumnsByColor.applescript
|
{columnName:"CAA Case", columnIndex:"", colorTests:{¬
{colorIndex:20, colorName:"ltGreen", fieldValue:1} ¬
|
addColumnsByColor.applescript
|
{columnName:"Location", columnIndex:"", colorTests:{¬
{colorIndex:15, colorName:"gray", fieldValue:"USA"}, ¬
|
addColumnsByColor.applescript
|
{colorIndex:34, colorName:"skyBlue", fieldValue:"Netherlands"}, ¬
|
addColumnsByColor.applescript
|
{colorIndex:32, colorName:"sage", fieldValue:"Brazil"}, ¬
|
addColumnsByColor.applescript
|
{colorIndex:38, colorName:"pink", fieldValue:"Spain"} ¬
|
addColumnsByColor.applescript
|
{columnName:"Status", columnIndex:"", colorTests:{¬
{colorIndex:46, colorName:"orange", fieldValue:"Pending"}, ¬
|
addColumnsByColor.applescript
|
{colorIndex:7, colorName:"hotPink", fieldValue:"Partial"}, ¬
|
addColumnsByColor.applescript
|
{colorIndex:13, colorName:"indigo", fieldValue:"Complete"} ¬
|
addColumnsByColor.applescript
|
set _resultRowList to {}
|
addColumnsByColor.applescript
|
set _worksheet to active sheet
|
addColumnsByColor.applescript
|
set _rangeSelected to range _rangeSelectedText of _worksheet
|
addColumnsByColor.applescript
|
repeat with col from 1 to length of _columnRecordList
|
addColumnsByColor.applescript
|
set _columnRecord to (a reference to item col of _columnRecordList)
|
addColumnsByColor.applescript
|
set _columnNameCur to columnName of _columnRecord
|
addColumnsByColor.applescript
|
set _headerList to my getRowValues(_worksheet, _headerRowIndex)
|
addColumnsByColor.applescript
|
set _columnIndex to my getListPosition(_headerList, _columnNameCur)
|
addColumnsByColor.applescript
|
if _columnIndex is 0 then
|
addColumnsByColor.applescript
|
set _colEndRange to get end (used range of active sheet) direction toward the right
|
addColumnsByColor.applescript
|
set _colNextIndex to get (first column index of _colEndRange) + 1
|
addColumnsByColor.applescript
|
set _rangeFlag to range (get address of row _headerRowIndex of column _colNextIndex)
|
addColumnsByColor.applescript
|
set value of _rangeFlag to _columnNameCur
|
addColumnsByColor.applescript
|
set bold of font object of _rangeFlag to true
|
addColumnsByColor.applescript
|
set _columnIndex to _colNextIndex
|
addColumnsByColor.applescript
|
set columnIndex of contents of _columnRecord to _columnIndex
|
addColumnsByColor.applescript
|
set _rangeNew to range ¬
|
addColumnsByColor.applescript
|
((get address of row _headerRowIndex of column (columnIndex of first item of _columnRecordList)) & ":" & ¬
|
addColumnsByColor.applescript
|
(get address of row _headerRowIndex of column (my getMaxColumnIndex(_columnRecordList))))
|
addColumnsByColor.applescript
|
set _rowMaxIndex to first row index of last row of _rangeSelected
|
addColumnsByColor.applescript
|
repeat with i from _dataRowStartIndex to _rowMaxIndex
|
addColumnsByColor.applescript
|
set _rangeCur to my getRowRange(_rangeSelected, i)
|
addColumnsByColor.applescript
|
set _rowCurIndex to first row index of _rangeCur
|
addColumnsByColor.applescript
|
set _colColorList to my getCellColorIndex(_rangeCur)
|
addColumnsByColor.applescript
|
set _testResultList to {}
|
addColumnsByColor.applescript
|
repeat with j from 1 to length of _columnRecordList
|
addColumnsByColor.applescript
|
set _columnRecord to item j of _columnRecordList
|
addColumnsByColor.applescript
|
set _columnTestList to colorTests of _columnRecord
|
addColumnsByColor.applescript
|
set _columnIndexCur to columnIndex of _columnRecord
|
addColumnsByColor.applescript
|
repeat with _testNum from 1 to length of _columnTestList
|
addColumnsByColor.applescript
|
set _testCur to item _testNum of _columnTestList
|
addColumnsByColor.applescript
|
set _colorCurIndex to colorIndex of _testCur
|
addColumnsByColor.applescript
|
if _colColorList contains _colorCurIndex then
|
addColumnsByColor.applescript
|
set _resultValueCur to fieldValue of _testCur
|
addColumnsByColor.applescript
|
set _resultValueCur to ""
|
addColumnsByColor.applescript
|
set _columnTestListLength to length of _columnTestList
|
addColumnsByColor.applescript
|
if _columnTestListLength > 1 then
|
addColumnsByColor.applescript
|
if _resultValueCur is not "" then
|
addColumnsByColor.applescript
|
set end of _testResultList to _resultValueCur
|
addColumnsByColor.applescript
|
else if _testNum is _columnTestListLength then
|
addColumnsByColor.applescript
|
set end of _testResultList to ""
|
addColumnsByColor.applescript
|
set _resultRowList to _resultRowList & {_testResultList}
|
addColumnsByColor.applescript
|
set _resultIndex to 0
|
addColumnsByColor.applescript
|
repeat with i from _dataRowStartIndex to length of _resultRowList
|
addColumnsByColor.applescript
|
set _resultIndex to _resultIndex + 1
|
addColumnsByColor.applescript
|
set _rowRange to my getRowRange(_rangeNew, i)
|
addColumnsByColor.applescript
|
set value of _rowRange to item _resultIndex of _resultRowList
|
addColumnsByColor.applescript
|
on getRowValues(theWorksheet, rowNumber)
|
addColumnsByColor.applescript
|
set _range to my getRowRange(used range of theWorksheet, rowNumber)
|
addColumnsByColor.applescript
|
set _rowValueList to value of _range
|
addColumnsByColor.applescript
|
item 1 of _rowValueList
|
addColumnsByColor.applescript
|
end getRowValues
|
addColumnsByColor.applescript
|
on getRowRangeUsed(rangeUsed, rowNumber)
|
addColumnsByColor.applescript
|
if rangeUsed is "" then
|
addColumnsByColor.applescript
|
set _rangeUsed to used range of active sheet
|
addColumnsByColor.applescript
|
set _rangeUsed to rangeUsed
|
addColumnsByColor.applescript
|
return my getRowRange(_rangeUsed, rowNumber)
|
addColumnsByColor.applescript
|
end getRowRangeUsed
|
addColumnsByColor.applescript
|
on getRowRange(theRange, rowNumber)
|
addColumnsByColor.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.