text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
end dir | +files.applescript |
to resolve(fp as text) | +files.applescript |
if not (exists fp) then return false | +files.applescript |
set f to __finder__(fp) | +files.applescript |
if f's class = «class alia» then tell ¬ | +files.applescript |
f's «class orig» to if (exists) ¬ | +files.applescript |
then return resolve(it as alias) | +files.applescript |
end resolve | +files.applescript |
on classOfFile(fp as text) | +files.applescript |
class of sys's item fp | +files.applescript |
end classOfFile | +files.applescript |
to show:fs | +files.applescript |
activate Finder | +files.applescript |
continue «event miscmvis» fs | +files.applescript |
end show: | +files.applescript |
on reveal fs | +files.applescript |
show_(fs) | +files.applescript |
end reveal | +files.applescript |
to tag(fp as text, index) | +files.applescript |
set «class labi» of f to index | +files.applescript |
end tag | +files.applescript |
to untag(fp) | +files.applescript |
tag(fp, 0) | +files.applescript |
end untag | +files.applescript |
on filename(fp as text) | +files.applescript |
name of __sys__(fp) | +files.applescript |
end filename | +files.applescript |
on ext(fp as text) | +files.applescript |
«class extn» of __sys__(fp) | +files.applescript |
end ext | +files.applescript |
on defaultApp for fp as text | +files.applescript |
default application of __sys__(fp) as alias | +files.applescript |
return the name of the application named result | +files.applescript |
end defaultApp | +files.applescript |
on appIcon for fp as text | +files.applescript |
set A to application named (defApp for fp) | +files.applescript |
set infoPlist to [path to A, "Contents:Info.plist"] as text | +files.applescript |
tell application "System Events" to get value of ¬ | +files.applescript |
property list item "CFBundleIconFile" of ¬ | +files.applescript |
property list file infoPlist | +files.applescript |
set filename to the result | +files.applescript |
path to resource filename in bundle A | +files.applescript |
path to resource filename & ".icns" in bundle A | +files.applescript |
end appIcon | +files.applescript |
property NSFileManager : a reference to NSFileManager of this | +files.applescript |
property NSMetadataItem : a reference to NSMetadataItem of this | +files.applescript |
property NSMetadataQuery : a reference to NSMetadataQuery of this | +files.applescript |
property NSPasteboard : a reference to NSPasteboard of this | +files.applescript |
property NSSortDescriptor : a reference to NSSortDescriptor of this | +files.applescript |
property FileManager : a reference to NSFileManager's defaultManager | +files.applescript |
property Pasteboard : a reference to NSPasteboard's generalPasteboard | +files.applescript |
property SkipHiddenFiles : a reference to 4 | +files.applescript |
property SkipPackageDescendants : a reference to 2 | +files.applescript |
property CreationDateKey : "NSURLCreationDateKey" | +files.applescript |
property FileSizeKey : "NSURLFileSizeKey" | +files.applescript |
property IsDirectoryKey : "NSURLIsDirectoryKey" | +files.applescript |
property ModificationDateKey : "NSURLContentModificationDateKey" | +files.applescript |
property NameKey : "NSURLNameKey" | +files.applescript |
property ParentURLKey : "NSURLParentDirectoryURLKey" | +files.applescript |
property PathKey : "_NSURLPathKey" | +files.applescript |
property kMDPathKey : "kMDItemPath" | +files.applescript |
(NSString's stringWithString:str)'s ¬ | +files.applescript |
stringByStandardizingPath() | +files.applescript |
to __NSURL__(|URL|) | +files.applescript |
if (|URL| exists) then return NSURL's ¬ | +files.applescript |
fileURLWithPath:__NSString__(|URL|) | +files.applescript |
NSURL's URLWithString:|URL| | +files.applescript |
end __NSURL__ | +files.applescript |
to __NSArray__(obj) | +files.applescript |
NSArray's arrayWithArray:obj | +files.applescript |
NSArray's arrayWithObject:obj | +files.applescript |
end __NSArray__ | +files.applescript |
(__NSArray__([obj]) as list)'s item 1 | +files.applescript |
on fileExtensionForType:(UTI as text) | +files.applescript |
local UTI | +files.applescript |
(Workspace()'s preferredFilenameExtensionForType:UTI) as text | +files.applescript |
end fileExtensionForType: | +files.applescript |
on bundleIDsForType:(UTI as text) | +files.applescript |
ObjC.import('CoreServices'); | +files.applescript |
ObjC.deepUnwrap( | +files.applescript |
$.LSCopyAllRoleHandlersForContentType( | +files.applescript |
" & UTI's quoted form & ", | +files.applescript |
$.kLSRolesAll | +files.applescript |
end bundleIDsForType: | +files.applescript |
on apps for typeOrExtension as text | +files.applescript |
local typeOrExtension | +files.applescript |
if typeOrExtension contains "." then return ¬ | +files.applescript |
bundleIDsForType_(typeOrExtension) | +files.applescript |
repeat with dir in [¬ | +files.applescript |
"~/Documents", ¬ | +files.applescript |
"~/Desktop", ¬ | +files.applescript |
"~/Downloads", ¬ | +files.applescript |
"~/Pictures"] | +files.applescript |
tell (deepDive into dir for typeOrExtension) to if it ≠ {} ¬ | +files.applescript |
then return (my bundleIDsForType:((my Workspace())'s ¬ | +files.applescript |
typeOfFile:(its some item) |error|:nil)) | +files.applescript |
end apps | +files.applescript |
to runWorkflow at fp as text given input:fs as list | +files.applescript |
local fp, fs | +files.applescript |
AMWorkflow's runWorkflowAtURL:__NSURL__(fp) withInput:fs |error|:_1 | +files.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.