text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
end createOmnifocusToDoFromNotes
|
Omnifocus2SyncEvernote.applescript
|
property myName : "_FinderLib" ---> (the name of this library)
|
AppleScript_finderLib.applescript
|
set _items to every item of _sel
|
AppleScript_finderLib.applescript
|
return _items
|
AppleScript_finderLib.applescript
|
on getOnlyFiles(_items)
|
AppleScript_finderLib.applescript
|
if kind of _item is not "Folder" and kind of _item is not "Alias" then
|
AppleScript_finderLib.applescript
|
set end of _list to _item as alias
|
AppleScript_finderLib.applescript
|
return _list
|
AppleScript_finderLib.applescript
|
end getOnlyFiles
|
AppleScript_finderLib.applescript
|
on getOnlyFolders(_items)
|
AppleScript_finderLib.applescript
|
set _folders to {}
|
AppleScript_finderLib.applescript
|
if kind of _item is "Folder" then
|
AppleScript_finderLib.applescript
|
set end of _folders to _item as alias
|
AppleScript_finderLib.applescript
|
return _folders
|
AppleScript_finderLib.applescript
|
end getOnlyFolders
|
AppleScript_finderLib.applescript
|
on getFirstItem(_items)
|
AppleScript_finderLib.applescript
|
if _items is not {} then
|
AppleScript_finderLib.applescript
|
set _item to item 1 of _items
|
AppleScript_finderLib.applescript
|
on error _msg number _n
|
AppleScript_finderLib.applescript
|
"Oops! Something went wrong: " & {return} & {return} & ¬
|
AppleScript_finderLib.applescript
|
_msg & {return} & "( error code " & _n & " )" with title ("Error") with icon (caution)
|
AppleScript_finderLib.applescript
|
return _item
|
AppleScript_finderLib.applescript
|
end getFirstItem
|
AppleScript_finderLib.applescript
|
on getNames(_items)
|
AppleScript_finderLib.applescript
|
set _fullname to name of _item
|
AppleScript_finderLib.applescript
|
set end of _list to _fullname
|
AppleScript_finderLib.applescript
|
end getNames
|
AppleScript_finderLib.applescript
|
on getBasenames(_items)
|
AppleScript_finderLib.applescript
|
if name extension of _item is not "" then
|
AppleScript_finderLib.applescript
|
set _here to -(offset of "." in ((reverse of text items of _fullname) as text)) - 1
|
AppleScript_finderLib.applescript
|
set _basename to (text 1 thru _here of _fullname)
|
AppleScript_finderLib.applescript
|
set _basename to (_basename as string)
|
AppleScript_finderLib.applescript
|
set _basename to _fullname
|
AppleScript_finderLib.applescript
|
set end of _list to _basename
|
AppleScript_finderLib.applescript
|
end getBasenames
|
AppleScript_finderLib.applescript
|
on getBasenameOfFirstItem(_items)
|
AppleScript_finderLib.applescript
|
return _basename
|
AppleScript_finderLib.applescript
|
end getBasenameOfFirstItem
|
AppleScript_finderLib.applescript
|
on getBasenamesOfOnlyFiles(_items)
|
AppleScript_finderLib.applescript
|
end getBasenamesOfOnlyFiles
|
AppleScript_finderLib.applescript
|
on getExtensions(_items)
|
AppleScript_finderLib.applescript
|
set _ext to name extension of _item
|
AppleScript_finderLib.applescript
|
set end of _list to _ext
|
AppleScript_finderLib.applescript
|
end getExtensions
|
AppleScript_finderLib.applescript
|
on getExtensionsOfOnlyFiles(_items)
|
AppleScript_finderLib.applescript
|
end getExtensionsOfOnlyFiles
|
AppleScript_finderLib.applescript
|
on toggleExtensionsHidden(_items)
|
AppleScript_finderLib.applescript
|
set _item to _item
|
AppleScript_finderLib.applescript
|
set _extHidden to extension hidden of _item
|
AppleScript_finderLib.applescript
|
if _extHidden is false then
|
AppleScript_finderLib.applescript
|
tell _item to set extension hidden to true
|
AppleScript_finderLib.applescript
|
tell _item to set extension hidden to false
|
AppleScript_finderLib.applescript
|
end toggleExtensionsHidden
|
AppleScript_finderLib.applescript
|
on getPosixPaths(_items)
|
AppleScript_finderLib.applescript
|
set _path to (POSIX path of (_item as alias))
|
AppleScript_finderLib.applescript
|
set end of _list to _path
|
AppleScript_finderLib.applescript
|
"Couldn't get POSIX path: " & {return} & {return} & ¬
|
AppleScript_finderLib.applescript
|
end getPosixPaths
|
AppleScript_finderLib.applescript
|
on getPosixPathsQ(_items)
|
AppleScript_finderLib.applescript
|
set end of _list to (quoted form of _path)
|
AppleScript_finderLib.applescript
|
"Couldn't get quoted POSIX path: " & {return} & {return} & ¬
|
AppleScript_finderLib.applescript
|
end getPosixPathsQ
|
AppleScript_finderLib.applescript
|
on getEscapedPosixArray(_items)
|
AppleScript_finderLib.applescript
|
set original_delims to AppleScript's text item delimiters
|
AppleScript_finderLib.applescript
|
set _path to (_path as text)
|
AppleScript_finderLib.applescript
|
set _pathString to {}
|
AppleScript_finderLib.applescript
|
set _escapedSpace to ("\\ " as text)
|
AppleScript_finderLib.applescript
|
repeat with _t in every text item in _path
|
AppleScript_finderLib.applescript
|
set end of _pathString to ((_t & _escapedSpace) as text)
|
AppleScript_finderLib.applescript
|
set _pathString to _pathString as text
|
AppleScript_finderLib.applescript
|
set _pathString to (characters 1 thru -3 of _pathString)
|
AppleScript_finderLib.applescript
|
set end of _list to _pathString & " "
|
AppleScript_finderLib.applescript
|
set _list to _list as string
|
AppleScript_finderLib.applescript
|
set _list to text items 1 thru -2 of _list
|
AppleScript_finderLib.applescript
|
set _list to _list as text
|
AppleScript_finderLib.applescript
|
set _shArray to ("(" & _list & ")") as text
|
AppleScript_finderLib.applescript
|
set AppleScript's text item delimiters to original_delims -- {""}
|
AppleScript_finderLib.applescript
|
return _shArray
|
AppleScript_finderLib.applescript
|
end getEscapedPosixArray
|
AppleScript_finderLib.applescript
|
on getHFSPaths(_items)
|
AppleScript_finderLib.applescript
|
set _path to (_item as text)
|
AppleScript_finderLib.applescript
|
"Couldn't get HFS path: " & {return} & {return} & ¬
|
AppleScript_finderLib.applescript
|
end getHFSPaths
|
AppleScript_finderLib.applescript
|
on getHFSPathsQ(_items)
|
AppleScript_finderLib.applescript
|
end getHFSPathsQ
|
AppleScript_finderLib.applescript
|
on getParentPosix(_items)
|
AppleScript_finderLib.applescript
|
set _container to container of item 1 of (_items)
|
AppleScript_finderLib.applescript
|
set _parent to POSIX path of (_container as string)
|
AppleScript_finderLib.applescript
|
return _parent
|
AppleScript_finderLib.applescript
|
error "Can't getParent: " & eMsg number eNum
|
AppleScript_finderLib.applescript
|
end getParentPosix
|
AppleScript_finderLib.applescript
|
on getParentHFS(_items)
|
AppleScript_finderLib.applescript
|
set _parent to (_container as string)
|
AppleScript_finderLib.applescript
|
end getParentHFS
|
AppleScript_finderLib.applescript
|
on getBasenameOfItem(_item)
|
AppleScript_finderLib.applescript
|
if _item is not {} and _item is not "" then
|
AppleScript_finderLib.applescript
|
end getBasenameOfItem
|
AppleScript_finderLib.applescript
|
on getNameAndExt(_item)
|
AppleScript_finderLib.applescript
|
set _delimsOld to (AppleScript's text item delimiters)
|
AppleScript_finderLib.applescript
|
set _delimsNew to ("")
|
AppleScript_finderLib.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.